UGX-Mods

Call of Duty 5: World at War => Tutorial Desk => Scripting => Topic started by: InFInIX on May 22, 2014, 07:34:13 pm

Title: Glowing zombie-eyes
Post by: InFInIX on May 22, 2014, 07:34:13 pm
All credits goes to treyarch AND weezy428

Ok the FULL tutorial is in _zombiemode_spawners.gsc
Step 1

Find this!
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;
}
/* if(!isdefined(level._numZombEyeGlows))
{
level._numZombEyeGlows = 0;
}

// if(level.zombie_eyes_limited && level._numZombEyeGlows > 8)
// return;

if ( level.zombie_eyes_disabled )
{
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 );

level._numZombEyeGlows ++;
addtagname(linkTag);
self haseyes(1);*/
}

now replace it with this!
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 );
}

to stopp the FX after the zombie died
find this!

Code Snippet
Plaintext
// 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();
level._numZombEyeGlows --;
}

self haseyes(0);*/
}

and replace it with this code!

Code Snippet
Plaintext
// 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();
}
}
Title: Re: Glowing zombie-eyes
Post by: MakeCents on May 22, 2014, 08:59:38 pm
to stopp the FX after the zombie died
find this!

Code Snippet
Plaintext
// 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();
}
}

and replace it with this code!

Code Snippet
Plaintext
// 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();
level._numZombEyeGlows --;
}

self haseyes(0);*/
}

I think you have these backwards?
Title: Re: Glowing zombie-eyes
Post by: InFInIX on May 23, 2014, 03:06:04 pm
I think you have these backwards?

switched :)