Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function give_snail_perk()
- {
- self.has_snail_perk = true;
- // other shader stuff and stuff to match his tutorial here
- self thread check_for_close_zoms();
- }
- function check_for_close_zoms()
- {
- while(self.has_snail_perk)
- {
- zoms = GetAISpeciesArray( "axis", "all" );
- zoms = util::get_array_of_closest( self.origin, zoms , undefined , undefined, 150 ); // 150 is the max distance. take a look at this function in util.gsc to edit stuff
- foreach( zom in zoms )
- {
- if( !isDefined( zom.is_snailed )
- zom thread warp_time();
- }
- wait(0.05);
- }
- }
- function warp_time()
- {
- self.is_snailed = true;
- self ASMSetAnimationRate(0.5);
- self SetMoveSpeedScale(.1);
- wait(3); // this is how long it will be slowed
- self.is_snailed = undefined;
- self ASMSetAnimationRate(1);
- self SetMoveSpeedScale(1);
- }
- function take_snail_perk()
- {
- self.has_snail_perk = false;
- // other stuff here
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement