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 Script?

broken avatar :(
Created 10 years ago
by MrDunlop4
0 Members and 1 Guest are viewing this topic.
3,121 views
broken avatar :(
×
broken avatar :(
Face to Face
Location: chSomwhere
Date Registered: 6 October 2013
Last active: 12 months ago
Posts
949
Respect
Forum Rank
The Decider
Primary Group
Member
My Contact & Social Links
More
Signature
Maya <3

Let's Play some osu!
×
MrDunlop4's Groups
MrDunlop4's Contact & Social LinksNelielexy0Nelielexy0CSMrDunlop4NelieleyNelielexy0Nelielexy0
Hey Guys

Does anyone have a script for hitmarker? When yes can i got it?

Thx

MrDunlop4
broken avatar :(
×
broken avatar :(
Location: gbsomerset
Date Registered: 2 March 2014
Last active: 11 months ago
Posts
169
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
Now you see me, Now you don`t
×
FATKIDSLOV3CAK3's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
FATKIDSLOV3CAK3's Contact & Social LinksHypercaineHypercaineZombies_dieFATKIDSLOV3CAK3
i would also like this
broken avatar :(
×
broken avatar :(
Location: usbuffalo
Date Registered: 16 August 2013
Last active: 11 months ago
Posts
927
Respect
Forum Rank
The Decider
Primary Group
Community Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
Giggity.
Signature
maps:
Undead Town
http://ugx-mods.com/forum/index.php?topic=2294.0 (Release)
Origins 1922
http://ugx-mods.com/forum/index.php?topic=2659.0
[WIP] mapping 39%, weapons 85%, scripts 65%
[/url]
×
RamboBadass's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
RamboBadass's Contact & Social LinksAsk merambobadassRamboDaGreat
I will 3rd this ... Someone please hook us up! Lol
broken avatar :(
×
broken avatar :(
Location: nlApeldoorn
Date Registered: 17 December 2013
Last active: 1 year ago
Posts
1,187
Respect
1,404Add +1
Forum Rank
Zombie Colossus
Primary Group
Community Scripter Elite
My Groups
More
My Contact & Social Links
More
Personal Quote
It aint much, if it aint Dutch
Signature
×
BluntStuffy's Groups
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.
Oil Rig Beta Access
Oil Rig Beta Access
BluntStuffy's Contact & Social LinksBluntstuffy@BluntZombieBluntStuffyStuffyZombie
never tried, but maybe you can use this somehow:

maps\_damagefeedback.gsc

broken avatar :(
×
broken avatar :(
Location: usYork, SC
Date Registered: 15 March 2014
Last active: 5 years ago
Posts
214
Respect
Forum Rank
Mr. Elemental
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
WaW Scriptor
Signature
WaW Scriptor
×
PROxFTW's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
PROxFTW's Contact & Social LinksPROxFTWPROxFTWPROxFTWPROxFTW
Here try this out. Note: The sound doesn't seem to work and probably because either I don't have it in the mod.csv or it is very quiet but I couldn't find the sound file for the hit marker so if you want that you will have to do that part yourself.
First copy _damagefeedback.gsc into mods/Mapname/maps
Now replace everything in that gsc with
Code Snippet
Plaintext
// MikeD (12/17/2007): Not called anywhere
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;
}
Next in mapname.gsc find
Code Snippet
Plaintext
init() {  }
and below
Code Snippet
Plaintext
maps\_zombiemode::main();
add
Code Snippet
Plaintext
level thread HitTest();
And above
Code Snippet
Plaintext
maps\_zombiemode::main();
add
Code Snippet
Plaintext
precacheShader( "damage_feedback" );
And at the bottom of mapname.gsc add
Code Snippet
Plaintext
HitTest()
{
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;
}
}
Note: Don't forget to check _damagefeedback.gsc when you build your mod
broken avatar :(
×
broken avatar :(
Location: gbsomerset
Date Registered: 2 March 2014
Last active: 11 months ago
Posts
169
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
Now you see me, Now you don`t
×
FATKIDSLOV3CAK3's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
FATKIDSLOV3CAK3's Contact & Social LinksHypercaineHypercaineZombies_dieFATKIDSLOV3CAK3

Note: Don't forget to check _damagefeedback.gsc when you build your mod

thanks man will try this out in abit  :)
Last Edit: October 24, 2014, 04:35:12 pm by FATKIDSLOV3CAK3
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 8 January 2014
Last active: 6 years ago
Posts
840
Respect
Forum Rank
The Decider
Primary Group
Community Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
Embers are the new lens flares
×
chromastone10's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
chromastone10's Contact & Social Linkschromastone10chromastone1chromastone10
Here try this out. Note: The sound doesn't seem to work and probably because either I don't have it in the mod.csv or it is very quiet but I couldn't find the sound file for the hit marker so if you want that you will have to do that part yourself.
First copy _damagefeedback.gsc into mods/Mapname/maps
Now replace everything in that gsc with
Code Snippet
Plaintext
// MikeD (12/17/2007): Not called anywhere
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;
}
Next in mapname.gsc find
Code Snippet
Plaintext
init() {  }
and below
Code Snippet
Plaintext
maps\_zombiemode::main();
add
Code Snippet
Plaintext
level thread HitTest();
And above
Code Snippet
Plaintext
maps\_zombiemode::main();
add
Code Snippet
Plaintext
precacheShader( "damage_feedback" );
And at the bottom of mapname.gsc add
Code Snippet
Plaintext
HitTest()
{
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;
}
}
Note: Don't forget to check _damagefeedback.gsc when you build your mod

this doesnt work coop, when another player shoots or damages a zombie, the hitmarker appears on everyone's screen
broken avatar :(
×
broken avatar :(
Location: usYork, SC
Date Registered: 15 March 2014
Last active: 5 years ago
Posts
214
Respect
Forum Rank
Mr. Elemental
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
WaW Scriptor
×
PROxFTW's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
PROxFTW's Contact & Social LinksPROxFTWPROxFTWPROxFTWPROxFTW
this doesnt work coop, when another player shoots or damages a zombie, the hitmarker appears on everyone's screen
Here chroma, try this and see if this makes a difference. Replace _damagefeedback.gsc with
Code Snippet
Plaintext
#include maps\_hud_util;
// MikeD (12/17/2007): Not called anywhere
init()
{
//precacheShader( "damage_feedback" );

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

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

self.hud_damagefeedback = self CreateRectangle( "", "", 0, 0, 24, 48, 1, ( 1, 1, 1 ), 0, "damage_feedback" );
}

CreateRectangle( Align, Relative, X, Y, Width, Height, Sort, Color, Alpha, Shader )
{
Box = NewClientHUDElem( self );
Box.ElemType = "bar";
if( !level.splitscreen )
{
Box.X = -2;
Box.Y = -2;
}
Box.Width = Width;
Box.Height = Height;
Box.Align = Align;
Box.Relative = Relative;
Box.XOffset = 0;
Box.YOffset = 0;
Box.Children = [];
Box.Sort = Sort;
if( IsDefined( Color ) )
Box.Color = Color;
Box.Alpha = Alpha;
Box.Shader = Shader;
Box SetParent( level.UIParent );
Box SetShader( Shader, Width, Height );
Box.Hidden = false;
Box SetPoint( Align, Relative, X, Y );
return Box;
}

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( "MP_hit_alert" );

self.hud_damagefeedback.alpha = 1;
self.hud_damagefeedback fadeOverTime( 1 );
self.hud_damagefeedback.alpha = 0;
}
and then in mapname.gsc replace
Code Snippet
Plaintext
HitTest(){ }
with
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;
}
}

 
Loading ...