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

Forcing a Round Change

broken avatar :(
Created 7 years ago
by LuigiTheSayajin
0 Members and 1 Guest are viewing this topic.
2,504 views
broken avatar :(
×
broken avatar :(
Location: de
Date Registered: 15 November 2015
Last active: 3 years ago
Posts
36
Respect
Forum Rank
Legless Crawler
Primary Group
Member
My Contact & Social Links
More
×
LuigiTheSayajin's Contact & Social LinksWeedScoper69
Is it possible to force a round change with a trigger and kill the zombies that are left from the last round?
If it's possible could somebody make a script for me? :)
Help would be appreciated

Best regards

LuigiTheSayajin
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
First in _zombiemode look for this:
Code Snippet
Plaintext
round_spawning()
{
level endon( "intermission" );
/#
level endon( "kill_round" );
#/


And change it into this:
Code Snippet
Plaintext
round_spawning()
{
level endon( "intermission" );
level endon( "stop_round_spawning" );
/#
level endon( "kill_round" );
#/



Then use this script for the trigger:
Code Snippet
Plaintext
kill_round_trigger()
{
cost = 1500;
user = undefined;

trig = getent( "end_round_trigger", "targetname" );
trig setCursorHint("HINT_NOICON");
trig UseTriggerRequireLookAt();
trig SetHintString( "Press &&1 to end the round. Cost: "+cost );

while(1)
{
trig waittill( "trigger", user );

if( user.score < cost )
continue;

trig disable_trigger();
user maps\_zombiemode_score::minus_to_player_score( cost );

level notify( "stop_round_spawning" );
zombies = GetAiSpeciesArray( "axis", "all" );
for( i=0 ; i<zombies.size ; i++ )
{
zombies[i] dodamage( zombies[i].health+666, zombies[i].origin );
wait 0.05;
}

// Cooldown time
wait 60;
trig enable_trigger();
}
}
Last Edit: July 16, 2017, 09:22:58 pm by BluntStuffy
broken avatar :(
×
broken avatar :(
Location: de
Date Registered: 15 November 2015
Last active: 3 years ago
Posts
36
Respect
Forum Rank
Legless Crawler
Primary Group
Member
My Contact & Social Links
More
×
LuigiTheSayajin's Contact & Social LinksWeedScoper69
First in _zombiemode look for this:
Code Snippet
Plaintext
round_spawning()
{
level endon( "intermission" );
/#
level endon( "kill_round" );
#/


And change it into this:
Code Snippet
Plaintext
round_spawning()
{
level endon( "intermission" );
level endon( "stop_round_spawning" );
/#
level endon( "kill_round" );
#/



Then use this script for the trigger:
Code Snippet
Plaintext
kill_round_trigger()
{
cost = 1500;
user = undefined;

trig = getent( "end_round_trigger", "targetname" );
trig setCursorHint("HINT_NOICON");
trig UseTriggerRequireLookAt();
trig SetHintString( "Press &&1 to end the round. Cost: "+cost );

while(1)
{
trig waittill( "trigger", user );

if( user.score < cost )
continue;

trig disable_trigger();
user maps\_zombiemode_score::minus_to_player_score( cost );

level notify( "stop_round_spawning" );
zombies = GetAiSpeciesArray( "axis", "all" );
for( i=0 ; i<zombies.size ; i++ )
{
zombies[i] dodamage( zombies[i].health+666, zombies[i].origin );
wait 0.05;
}

// Cooldown time
wait 60;
trig enable_trigger();
}
}
Thx for the script :)
Could i use this with a trigger multiple and without cost and without the hintstring and only 1 time usable because i want to use this to teleport in a bossroom.

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
×
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
Quote
Could i use this with a trigger multiple and without cost and without the hintstring and only 1 time usable because i want to use this to teleport in a bossroom.

Code Snippet
Plaintext
kill_round_trigger()
{
trig = getent( "end_round_trigger", "targetname" );

trig waittill( "trigger" );
level notify( "stop_round_spawning" );
zombies = GetAiSpeciesArray( "axis", "all" );
for( i=0 ; i<zombies.size ; i++ )
{
zombies[i] dodamage( zombies[i].health+666, zombies[i].origin );
wait 0.05;
}

trig delete();
}

Last Edit: July 16, 2017, 09:45:35 pm by BluntStuffy
broken avatar :(
×
broken avatar :(
Location: de
Date Registered: 15 November 2015
Last active: 3 years ago
Posts
36
Respect
Forum Rank
Legless Crawler
Primary Group
Member
My Contact & Social Links
More
×
LuigiTheSayajin's Contact & Social LinksWeedScoper69
Code Snippet
Plaintext
kill_round_trigger()
{
trig = getent( "end_round_trigger", "targetname" );

trig waittill( "trigger" );
level notify( "stop_round_spawning" );
zombies = GetAiSpeciesArray( "axis", "all" );
for( i=0 ; i<zombies.size ; i++ )
{
zombies[i] dodamage( zombies[i].health+666, zombies[i].origin );
wait 0.05;
}

trig delete();
}


Thx Blunt! :D

 
Loading ...