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

Changing Zombie Speeds?

broken avatar :(
Created 8 years ago
by Deadon
0 Members and 1 Guest are viewing this topic.
4,115 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 11 November 2015
Last active: 4 years ago
Posts
10
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
Deadon's Groups
Deadon's Contact & Social Links
I've been trying this for quite a while and nothing really seems to work, so how do i make it when zombies hit a trigger their speed goes down or a number controlling speed goes down?
Thanks again for the 2 millionth time.  :P
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 20 September 2013
Last active: 3 years ago
Posts
130
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
Signature
Stupid, but it works.
×
X0master's Groups
X0master's Contact & Social LinksslayerbeastWar_gunner12YubLannights35
Code Snippet
Plaintext
self.moveplaybackrate
broken avatar :(
×
broken avatar :(
Senpai
Location: us
Date Registered: 28 September 2013
Last active: 3 years ago
Posts
605
Respect
Forum Rank
Zombie Enslaver
Primary Group
Box Mappers Elite
My Groups
More
My Contact & Social Links
More
×
arceus's Groups
Box Mappers Elite
Box Mappers Elite
arceus's Contact & Social LinksarceusNT
could you be a little more descriptive. do you want to slow down the animation or just turn them into walkers?
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 11 November 2015
Last active: 4 years ago
Posts
10
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
Deadon's Groups
Deadon's Contact & Social Links
Change them into Walkers, Then when they leave the trigger, go back.
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 11 March 2014
Last active: 3 years ago
Posts
264
Respect
Forum Rank
Mr. Elemental
Primary Group
Member
Signature
"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live."
×
buttkicker845's Groups
buttkicker845's Contact & Social Links
Change them into Walkers, Then when they leave the trigger, go back.
well in that case what you want to do is something like this for making them walk
Code Snippet
Plaintext
force_zombie_walk()
{
self.lastRunAnim = self.run_combatanim;
var = randomintrange(1, 8);         
self set_run_anim( "walk" + var );                         
self.run_combatanim = level.scr_anim[self.animname]["walk" + var];       
}
and this for returning to the old run animation
Code Snippet
Plaintext
set_old_zombie_speed()
{
self set_run_anim( self.lastRunAnim );                         
self.run_combatanim = self.lastRunAnim;
}
call both of these methods on a zombie object, also dont call the first script on the same zombie multiple times without calling the second method. if you do the zombie will permanently be a walker
broken avatar :(
×
broken avatar :(
Location: deDortmund
Date Registered: 20 December 2015
Last active: 9 days ago
Posts
307
Respect
Forum Rank
Perk Hacker
Primary Group
Community Scripter
My Groups
More
Personal Quote
Payback
Signature
Tears Of The Fallen | Join the project https://discord.gg/8gDNQRj
×
fanmagic's Groups
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
fanmagic's Contact & Social LinksTears Of The Fallen
You can change there speed in your "_zombiemode_spawner.gsc". Copy it from your root/raw/maps folder to your maps folder in your mod ( mods/yourmapname/maps ).

Open it and search for:

set_run_speed()
{
   rand = randomintrange( level.zombie_move_speed, level.zombie_move_speed + 35 );
   
//   self thread print_run_speed( rand );
   if( rand <= 35 )
   {
      self.zombie_move_speed = "walk";
   }
   else if( rand <= 70 )
   {
      self.zombie_move_speed = "run";
   }
   else
   {   
      self.zombie_move_speed = "sprint";
   }
}


Then you can change there speed in this function. You can use "walk", "run" and "sprint".
Hope it helps you.  ;)
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 11 November 2015
Last active: 4 years ago
Posts
10
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
Deadon's Groups
Deadon's Contact & Social Links
Actually, this was more helpful than i thought. I knew it was in that area, but now i know exactly where to change it, all i need now is how.
(I'm sorry if my English doesn't translate well)
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 11 March 2014
Last active: 3 years ago
Posts
264
Respect
Forum Rank
Mr. Elemental
Primary Group
Member
×
buttkicker845's Groups
buttkicker845's Contact & Social Links
You can change there speed in your "_zombiemode_spawner.gsc". Copy it from your root/raw/maps folder to your maps folder in your mod ( mods/yourmapname/maps ).

Open it and search for:
Code Snippet
Plaintext
set_run_speed()
{
rand = randomintrange( level.zombie_move_speed, level.zombie_move_speed + 35 );

// self thread print_run_speed( rand );
if( rand <= 35 )
{
self.zombie_move_speed = "walk";
}
else if( rand <= 70 )
{
self.zombie_move_speed = "run";
}
else
{
self.zombie_move_speed = "sprint";
}
}

Then you can change there speed in this function. You can use "walk", "run" and "sprint".
Hope it helps you.  ;)

you cant just change the values in the set_run_speed method in _zombiemode_spawner.gsc. that sets the speed for the zombies when they first spawn and then is never used again in the spawner code.
you need to do something like what i said to do and call a function that will set them to walkers and save their last speed and  then call a method that will set it back to their original speed
Last Edit: February 29, 2016, 08:33:12 pm by buttkicker845
broken avatar :(
×
broken avatar :(
Location: deDortmund
Date Registered: 20 December 2015
Last active: 9 days ago
Posts
307
Respect
Forum Rank
Perk Hacker
Primary Group
Community Scripter
My Groups
More
Personal Quote
Payback
×
fanmagic's Groups
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
fanmagic's Contact & Social LinksTears Of The Fallen
you cant just change the values in the set_run_speed method in _zombiemode_spawner.gsc. that sets the speed for the zombies when they first spawn and then is never used again in the spawner code.
you need to do something like what i said to do and call a function that will set them to walkers and save their last speed and  then call a method that will set it back to their original speed
I thougth he would like something easy. I don't say that this is the best way to do this but it's a way to change this.
broken avatar :(
×
broken avatar :(
Location: deDortmund
Date Registered: 20 December 2015
Last active: 9 days ago
Posts
307
Respect
Forum Rank
Perk Hacker
Primary Group
Community Scripter
My Groups
More
Personal Quote
Payback
×
fanmagic's Groups
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
fanmagic's Contact & Social LinksTears Of The Fallen
Oh. I forgot that he would like a trigger to change the speed. Sry  ;D

 
Loading ...