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

Stopping Zombie Eye Glow

broken avatar :(
Created 5 years ago
by Bigbeard2000
0 Members and 1 Guest are viewing this topic.
1,266 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 31 March 2015
Last active: 4 years ago
Posts
11
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
Bigbeard2000's Groups
Bigbeard2000's Contact & Social Links
I seen to be having a problem with eye glowing continuing after death. I followed the tutorial foudn here: 
https://www.ugx-mods.com/forum/scripting/50/glowing-zombie-eyes/2872 

Here is the relevant code found within my 
_zombiemode_spawners.gsc file:
Code Snippet
Plaintext
// When a Zombie spawns, set his eyes to glowing.
zombie_eye_glow()
{
if( IsDefined( level.zombie_eye_glow ) && !level.zombie_eye_glow )
{
return;
}

if( !IsDefined( self ) )
{
return;
}

linkTag = "J_Eyeball_LE";
fxModel = "tag_origin";
fxTag = "tag_origin";

// SRS 9/2/2008: only using one particle now per Barry's request;
//  modified to be able to turn particle off
self.fx_eye_glow = Spawn( "script_model", self GetTagOrigin( linkTag ) );
self.fx_eye_glow.angles = self GetTagAngles( linkTag );
self.fx_eye_glow SetModel( fxModel );
self.fx_eye_glow LinkTo( self, linkTag );

// TEMP for testing
//self.fx_eye_glow thread maps\_debug::drawTagForever( fxTag );

PlayFxOnTag( level._effect["eye_glow"], self.fx_eye_glow, fxTag );
}

// Called when either the Zombie dies or if his head gets blown off
zombie_eye_glow_stop()
{
if( IsDefined( self.fx_eye_glow ) )
{
self.fx_eye_glow Delete();
}
}
The glowing eyes just stay there even after the zombie despawns. It's a rather old issue that I have, so I thought I would get around to fixing it.
Marked as best answer by Bigbeard2000 5 years ago
broken avatar :(
×
broken avatar :(
Location: nl
Date Registered: 20 September 2013
Last active: 4 days ago
Posts
645
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
No code is bug free
Signature
My published cod maps:

Subzero
Djinncaves
Enclosed (a.k.a baconcube)
Bayern
Snowblind
Furtrelock

Black Ops Perks: https://www.ugx-mods.com/forum/scripts/55/call-of-duty-world-at-war-black-ops-perks/22180/
×
gympie6's Groups
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
gympie6's Contact & Social LinksTheRevenantSkullTeffrieTeffrieGympie5#5971
I seen to be having a problem with eye glowing continuing after death. I followed the tutorial foudn here:
https://www.ugx-mods.com/forum/scripting/50/glowing-zombie-eyes/2872

Here is the relevant code found within my
_zombiemode_spawners.gsc file:
Code Snippet
Plaintext
// When a Zombie spawns, set his eyes to glowing.
zombie_eye_glow()
{
if( IsDefined( level.zombie_eye_glow ) && !level.zombie_eye_glow )
{
return;
}

if( !IsDefined( self ) )
{
return;
}

linkTag = "J_Eyeball_LE";
fxModel = "tag_origin";
fxTag = "tag_origin";

// SRS 9/2/2008: only using one particle now per Barry's request;
//  modified to be able to turn particle off
self.fx_eye_glow = Spawn( "script_model", self GetTagOrigin( linkTag ) );
self.fx_eye_glow.angles = self GetTagAngles( linkTag );
self.fx_eye_glow SetModel( fxModel );
self.fx_eye_glow LinkTo( self, linkTag );

// TEMP for testing
//self.fx_eye_glow thread maps\_debug::drawTagForever( fxTag );

PlayFxOnTag( level._effect["eye_glow"], self.fx_eye_glow, fxTag );
}

// Called when either the Zombie dies or if his head gets blown off
zombie_eye_glow_stop()
{
if( IsDefined( self.fx_eye_glow ) )
{
self.fx_eye_glow Delete();
}
}
The glowing eyes just stay there even after the zombie despawns. It's a rather old issue that I have, so I thought I would get around to fixing it.
What I did to fix this problem is keep searching for the glowing eyes and delete it.
openup _zombiemode_spawner and search this:
Code Snippet
Plaintext
zombie_death_event( zombie )
at the end of the method add this:
Code Snippet
Plaintext
wait 0.5;
while(1)
{
if ( IsDefined( zombie.fx_eye_glow ) ) zombie.fx_eye_glow Delete();
else break; // I think return; also works
}
Hope it works on your side too.
Last Edit: May 14, 2019, 08:55:06 pm by gympie6

 
Loading ...