-
Best Way to Pause
There are times when you want to run condition 1 and then have condition 2 start 1 second later. What is the easiest or best way to do this. I have often used a counter and added one to it every 1/10 a second and then run condition 2 when the counter is 10. But when you have a lot of these, it can get a bit messy. It would be nice to have a way to easily do this.
Steve
-
Re: Best Way to Pause
Try the Function Eggtimer.
-
Re: Best Way to Pause
DavidN,
I took a look at this but do not see how to use it to make a delay of let's say 1 sec.
STeve
-
Re: Best Way to Pause
MMF2 runs (by default) 50 "event cycles" pr second.
That means that you can set Function Eggtimer to run a function after 50 event cycles and it will happen one second later.
For example:
- When player dies
---> Do function "restart" after 50 event cycles
- On function "restart"
---> Restart frame
..which gives you a 1 second pause.
If you changed your framerate from 50 to something else (like 60) then you just make Function Eggtimer wait 60 event cycles instead :) Simple isn't it?