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

Hitmarker Moddifications

broken avatar :(
Created 9 years ago
by MZslayer11
0 Members and 1 Guest are viewing this topic.
1,519 views
broken avatar :(
×
broken avatar :(
Location: usUnited States
Date Registered: 7 March 2014
Last active: 2 months ago
Posts
1,191
Respect
Forum Rank
Zombie Colossus
Primary Group
UGX Site Moderator
My Groups
More
My Contact & Social Links
More
×
MZslayer11's Groups
UGX Site Moderator Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.
MZslayer11's Contact & Social LinksMZslayer11Service_Code_30#2655
Hello, I have this hitmarker script which works perfectly. I was wondering if there would be a way to modify the script so a different style hitmarker shows when you get a kill that's different the regular hit.  And maby even a different hitmarker when you get a headshot kill. Here's the script i'm using:

damagefeedback.gsc
Code Snippet
Plaintext
init()
{
//precacheShader( "damage_feedback" );

//if ( getDvar( "scr_damagefeedback" ) == "" )
// setDvar( "scr_damagefeedback", "0" );

//if ( !getDvarInt( "scr_damagefeedback" ) )
// return;

self.hud_damagefeedback = newHudElem( self );
self.hud_damagefeedback.alignX = "center";
self.hud_damagefeedback.alignY = "middle";
self.hud_damagefeedback.horzAlign = "center";
self.hud_damagefeedback.vertAlign = "middle";
self.hud_damagefeedback.y = 12;
self.hud_damagefeedback.alpha = 0;
self.hud_damagefeedback.archived = true;
self.hud_damagefeedback setShader( "damage_feedback", 24, 48 );
}

monitorDamage()
{
//if ( !getDvarInt( "scr_damagefeedback" ) )
// return;
self.damageInit = true;

for ( ;; )
{
self waittill( "damage", amount, attacker );

if ( IsPlayer( attacker ) )
attacker updateDamageFeedback();
}
}

updateDamageFeedback()
{
//if ( !IsPlayer( self ) )
// return;

self playlocalsound( "SP_hit_alert" );

self.hud_damagefeedback.alpha = 1;
self.hud_damagefeedback fadeOverTime( 1 );
self.hud_damagefeedback.alpha = 0;
}


mapname.gsc
Code Snippet
Plaintext
HitTest()
{
flag_wait( "all_players_connected" );
        wait 1;
for( i = 0; i < GetPlayers().size; i++ )
GetPlayers()[i] thread maps\_damagefeedback::init();
while( 1 )
{
ai = GetAiArray( "axis" );
for( i = 0; i < ai.size; i++ )
if( !IsDefined( ai[i].damageInit ) )
ai[i] thread maps\_damagefeedback::monitorDamage();
wait .01;
}
}
broken avatar :(
×
broken avatar :(
[UGX] Documentation Writer & Programmer
Location: usLos Angeles, CA
Date Registered: 23 August 2013
Last active: 6 months ago
Posts
1,322
Respect
Forum Rank
Zombie Colossus
Primary Group
UGX Team Member
My Groups
More
My Contact & Social Links
More
Personal Quote
(ง º ω º )ง u wont sum m8y?
Signature
Do not take life too seriously. You will never get out of it alive.
×
DidUknowiPwn's Groups
UGX Team Member
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
1) Make it attacker thread updateDamageFeedback();
2) Add a parameter to updateDamageFeedback( cookies )
3) in it place this: self.hud_damagefeedback setShader( cookies, 24, 48 );
4) Call func by attacker thread updateDamageFeedback( "leshader" );

Do note: This may cause issues such as shooting at a normal ZM will then transform the shader to the special ZM shader. Suggestion duplicate the self.hud_damagefeedback to something else and then you can have a separate update thread for that shader.
Last Edit: December 18, 2014, 02:31:25 am by DidUknowiPwn

 
Loading ...