Map events you put on parallel process will stop processing when you change map. When you come back to the map it will start from the beginning.
Common events you put on parallel process will restart when you change map. Therefore only using large wait commands is not a good idea if you expect map changes.
This is where variables come since they do not change upon map change.
Here is an example of a common event you can use for waiting a specific amount of frames:
http://img216.imageshack.us/img216/3223 ... apsxu5.png[/img]
This works by waiting 4 frames, then subtracting 4 from the
Wait Frames Left variable.
Afterwards we check if there are no wait frames left. In this case we change another switch to signal that the wait is finished. Then we turns the activating switch off (for the common event).
If we change map then we could have a restart after 3 frames wait thus making us wait up to 3 frames more per map change.
You can increase the amount of frames to wait for each subtraction. This will use less resources but increase the potential wait.
If you decrease the amount of frames to wait for each subtraction then it's more resources but a more precise wait. I personally prefer 4 wait, hence my usage.
For this to work you must set the
Wait Frames Left variable to the amount of frames you want to wait. (1 second = 20 frames)
Do this before turning the
Wait Across Maps switch ON.
You may notice that in this example the wait is separated from what happens after the wait. You can reuse the wait if you want. You can create more common events like this where you only change the switches and variables used.
This will allow you to have several
timers running at the same time.
You can also decide to integrate the functionality after the wait into the wait part.
Try to judge what would be the best in your specific situation.
@Beran:
I would advice you to use "if var <= 0" instead of "if var == 0" since it prevents the possibility of a never ending wait. (I.e. an error happened and the variable got below 0)
I would say that using <= instead of == is a more robust solution.
*hugs*
- Zeriab