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

Change move speed of a zombie

broken avatar :(
Created 7 years ago
by fanmagic
0 Members and 1 Guest are viewing this topic.
1,452 views
broken avatar :(
×
broken avatar :(
Location: deDortmund
Date Registered: 20 December 2015
Last active: 5 months 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
Hello,
I would like to change the run speed of a boss zombie, but it doesn't work. The iPrintLNBold's are working fine, but the move speed isn't changing.

I use this to spawn the zombie:
Code Snippet
Plaintext
...more code...
zombie = spawn_zombie( ent );
zombie.zombie_move_speed = "walk";
zombie thread check_for_running();
...more code...


And this to change his speed, after I shoot him:
Code Snippet
Plaintext
check_for_running()
{
iPrintLNBold("Check run speed");

level endon("boss_killed");

while(IsAlive( self ))
{
if(self.health < self.maxhealth)
{
self.zombie_move_speed = "sprint";
iPrintLNBold("Sprint");
wait (10);
self.zombie_move_speed = "walk";
iPrintLNBold("Walk");
self.maxhealth = self.health;
}
wait(1);
}
}

Any idea?
Marked as best answer by fanmagic 7 years ago
broken avatar :(
×
broken avatar :(
Location: nlApeldoorn
Date Registered: 17 December 2013
Last active: 1 year ago
Posts
1,187
Respect
1,404Add +1
Forum Rank
Zombie Colossus
Primary Group
Community Scripter Elite
My Groups
More
My Contact & Social Links
More
Personal Quote
It aint much, if it aint Dutch
Signature
×
BluntStuffy's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
Oil Rig Beta Access
Oil Rig Beta Access
BluntStuffy's Contact & Social LinksBluntstuffy@BluntZombieBluntStuffyStuffyZombie
Code Snippet
Plaintext
		var = randomintrange(1, 8);         
self set_run_anim( "walk" + var );                         
self.run_combatanim = level.scr_anim[self.animname]["walk" + var];


and


Code Snippet
Plaintext
		var = randomintrange(1, 4);
self set_run_anim( "sprint" + var );                       
self.run_combatanim = level.scr_anim[self.animname]["sprint" + var];
broken avatar :(
×
broken avatar :(
Location: deDortmund
Date Registered: 20 December 2015
Last active: 5 months 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
Code Snippet
Plaintext
		var = randomintrange(1, 8);         
self set_run_anim( "walk" + var );                         
self.run_combatanim = level.scr_anim[self.animname]["walk" + var];


and


Code Snippet
Plaintext
		var = randomintrange(1, 4);
self set_run_anim( "sprint" + var );                       
self.run_combatanim = level.scr_anim[self.animname]["sprint" + var];
Thanks. :)

 
Loading ...