Stopping Zombie Eye Glow

broken avatar :(
Created 13 days ago
by Bigbeard2000
0 Members and 1 Guest are viewing this topic.
63 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 31 March 2015
Last active: 10 days 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:
// 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 on Today at 02:40:30 am
broken avatar :(
×
broken avatar :(
Location: nl
Date Registered: 20 September 2013
Last active: 22 hours ago
Posts
287
Respect
Forum Rank
Mr. Elemental
Primary Group
Community Scripter
×
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 LinksDistenc5Teffrie
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:
// 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:
zombie_death_event( zombie )
at the end of the method add this:
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

 

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 Twitch
Loading ...