Scripting help.

wrong
Joined 04/09/2018
Posts 37
04:38 PM 02/01/2019
Intermission script? What will the script be I need help


[BC] 10allday
Joined 25/08/2018
Posts 482
10:55 PM 02/01/2019
global.MAX_TIME = 120;
global.TIME = 0;

script = '
if(instance_number(obj_client) > 1 {
if(global.TIME > 0) {
if(global.TIME == 120) {
messageAll("The minigame has started!");
with obj_client {playerRespawn(id);}
}
topPrintAll(string(global.TIME)+" seconds remaining",1);
global.TIME -= 1;
schedule(1000,script);
} else {
messageAll("The minigame is over!");
messageAll("Restarting in 10 seconds...");
global.TIME = global.MAX_TIME;
schedule(10000,script);
}
} else {
centerPrintAll("2 players required",1)
schedule(1000,script)
}
';
execute_string(script);


Kaiokeno
Joined 02/11/2017
Posts 5,819
11:02 AM 04/01/2019
I think above is the script


Chrounum
Joined 21/01/2019
Posts 13
04:42 AM 21/01/2019
wait do scripts need to be ran in strings? lol.

1