G'day all,
I have made an all round mod for Brest that allows you to play FFA, TDM, Roundbased and TOW. I think it works pretty well except in FFA mode. I have a hidden trigger to give players a bit of fun for 30 seconds but am having trouble tagging the local.player on a trigger_multiple, here is my routine.
I'm not sure why it works in some game modes and not others, but you should probably change the for loop used to make the script wait to: wait 30 (Unless you're planning to expand the script to do something else within the loop).
Thanks Angex, I have revised it a little. Your solution is simpler but I found that if the player who had the stopwatch active died, no one else could use it for 60 seconds. I still have to find what the player.dmteam designation is for Free For All yet... Here is the new version with a check on the players condition.
That will goto that thread immediately, cease current operation and run the new thread on its own. Thread starts a thread but will not stop the current thread, if you only want to restart the thread, that may be your problem.
Hey thanks Shuriken1, you are right. I keep thinking that a call to a thread is the same as a goto. I try to avoid goto's but in this case I want to keep the thread running but needed a way out of the loop.
Thanks again for the tip.