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

Round Restart Script Help

broken avatar :(
Created 11 years ago
by jbird
0 Members and 1 Guest are viewing this topic.
2,181 views
broken avatar :(
×
broken avatar :(
Location: usUnited States
Date Registered: 13 May 2014
Last active: 5 days ago
Posts
167
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
×
jbird's Groups
Code Snippet
Plaintext
	{
self maps\_laststand::laststand_take_player_weapons();

zombs = getaispeciesarray("axis");
for(i=0;i<zombs.size;i++)
{
zombs[i] delete(); //removes all currently spawned in zombies
}

maps\_zombiemode_powerups::powerup_round_start(); //restarts the amount of powerups you can earn this round
array_thread( players, maps\_zombiemode_blockers_new::rebuild_barrier_reward_reset ); //restarts your barrier points this round
level thread round_spawning();

players = get_players();
for( i = 0; i < players.size; i++ ) //respawns you back in and gives you your weapons back
{
players[i] spectator_respawn();
players[i] [[level.spawnPlayer]]();
while(1)
{
if(players[i] hasWeapon("zombie_colt"))
{
players[i] maps\_laststand::laststand_giveback_player_weapons();
if( isDefined( players[i].has_altmelee ) && players[i].has_altmelee )
{
players[i] SetPerk( "specialty_altmelee" );
}
level thread award_grenades_for_survivors(); //get 2 extra grenades when you spawn back in, optional
break;
}
wait(0.05);
}
}
iprintlnbold("You have been given another chance"); //message letting you know the round restarted, optional
}

The problem is that the amount of zombies and zombies health increases when the round restarts. When I used a println to show the amount of zombies left for the round, it showed the right amount of zombies that were supposed to be in the round, but there were actually more zombies spawning in then that and when I killed enough zombies over the round amount, then the println would go negative.
Last Edit: June 23, 2015, 05:47:17 am by jbird
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 6 years ago
Posts
6,875
Respect
Forum Rank
Immortal
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Signature
If you want scripts / features made for you, then contact me by PM or email / skype etc
it will cost you tho so if you have no intention of reciprocating don't even waste my time ;)
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Harry Bo21's Contact & Social LinksHarryBo000[email protected]HarryBo21
and again youve posted "part of" a function...
broken avatar :(
×
broken avatar :(
Location: frPontault-Combault, France
Date Registered: 18 October 2014
Last active: 2 months ago
Posts
86
Respect
Forum Rank
Rotting Walker
Primary Group
Member
My Contact & Social Links
More
Signature
Visitez mon site : http://www.fr-mapping.net/index.php pour rejoindre la communauté Française sur le mod tools!
visit my website : http://www.fr-mapping.net/index.php to join french communauty on mod tools
×
Wolf_Silver's Groups
have you tried to add:
Code Snippet
Plaintext
level.zombie_health = level.zombie_vars["zombie_health_start"]; 
level.round_number = 1;
level.first_round = true;
?
broken avatar :(
×
broken avatar :(
Location: usUnited States
Date Registered: 13 May 2014
Last active: 5 days ago
Posts
167
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
×
jbird's Groups
have you tried to add:
Code Snippet
Plaintext
level.zombie_health = level.zombie_vars["zombie_health_start"]; 
level.round_number = 1;
level.first_round = true;
?
That would make it round 1 health everytime. I want the health to stay at whatever round it is, just restart the number of zombies in the round.
broken avatar :(
×
broken avatar :(
Location: frPontault-Combault, France
Date Registered: 18 October 2014
Last active: 2 months ago
Posts
86
Respect
Forum Rank
Rotting Walker
Primary Group
Member
My Contact & Social Links
More
×
Wolf_Silver's Groups
Trie to add this i don't know if it will work i am a beginner in scripting but i think that "level.zombie_total" is vars who control the numbers of zombies that will spawn in a round

Code Snippet
Plaintext
level.when_round_restart = level.round_number;
number_zombie_round_restart = level.zombie_total

    while (level.when_round_restart = level.round_number)
{
level.zombie_total = number_zombie_round_restart
}

 
Loading ...