Hey guys! Just as the title says, I am wondering how to make it so that something in my script does not happen until a certain round has been passed. I am sure it is something simple, but I am newer to scripting so I am unsure how to do this. Any help is much appreaciated!
Put the code above in the main() function of your script. Replace ‘10’ with the round you want your script to be used. Replace ‘your_function’ with the name of your function.
function YOUR_FUNCTION_NAME() { level endon(”end_game”);
while(1) { level waittill(”start_of_round”); if(level.round_number >= x) //Change x to round number { //Add a function or add other stuff here break; }
} }
Replace YOUR_FUNCTION_NAME with whatever you want.
Put the code above in the main() function of your script. Replace ‘10’ with the round you want your script to be used. Replace ‘your_function’ with the name of your function.
This would need a while loop in order to work. Otherwise it check the round number only when this function is called. This means that if the round is not right, nothing will happen and the function stops.
Last Edit: January 11, 2019, 03:49:06 pm by ihmiskeho