UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

How do I make a hit marker appear if I hit a certain object?

broken avatar :(
Created 9 years ago
by Wolfilms
0 Members and 1 Guest are viewing this topic.
1,591 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 28 June 2015
Last active: 6 years ago
Posts
72
Respect
Forum Rank
Rotting Walker
Primary Group
Member
×
Wolfilms's Groups
Wolfilms's Contact & Social Links
I want to hit a target and it shows a hit marker.
Marked as best answer by Wolfilms 9 years ago
broken avatar :(
×
broken avatar :(
Location: at
Date Registered: 26 November 2016
Last active: 7 years ago
Posts
45
Respect
Forum Rank
Legless Crawler
Primary Group
Member
My Contact & Social Links
More
Signature
12 year old music critic, quadrasexual Minecrafter, Linkin Park fan, Hentai enthusiast, intelligent atheist and vegan.
×
Cxwh's Groups
Cxwh's Contact & Social LinksCxwhModsGodAspire
If 'certain objects' means trigger this should help you

This is in the Script API Functions (it's c++)
Code Snippet
Plaintext
void <player> PlayHitMarker( <sound name>, <damage state>, <perk feedback>, <is dead> ) //parameters

[MANDATORY] <sound name> The name of the sound or hash //the name of the sound you want to play
[OPTIONAL] <damage state> How damaged the victim is //damage state defines the size of the hitmarker (you cant make it 9999 to make the hitmarker gigantic)
[OPTIONAL] <perk feedback> If the victim had any perks active that modified the hit marker //you get other hitmarkers when you deal explosive damage and the target has flakjacket
[OPTIONAL] <is dead> If the victim has died from this hit marker and needs a red flash //makes the hitmarker red

CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Plays a hit marker event
EXAMPLE: self PlayHitMarker( "evt_squad_activate", 3, "flakjacket" )
You can or should always check the 'bo3_scriptapifunctions.htm' file which was included in the mod tools for api/engine functions
Code Snippet
Plaintext
function example()
{
triggers = GetEntArray(ents, "targetname"); //replace 'ents' with the array name of all triggers that should play a hitmarker
foreach(trigger in triggers)
{
trigger waittill("trigger", player);
player PlayHitMarker("mpl_hit_alert"); //mpl_hit_alert is the standart hitmarker sound
}
}

//if you want to do this for only one trigger
function example()
{
triggers = GetEnt(name, "targetname"); //replace 'name' with the name of the trigger that should play a hitmarker
trigger waittill("trigger", player);
player PlayHitMarker("mpl_hit_alert"); //mpl_hit_alert is the standart hitmarker sound
}

 
Loading ...