Difference between revisions of "HPL3/Scripting/Scripting Guide/Timers"
m (TiMan moved page HPL3/Scripting/Timers to HPL3/Scripting/Scripting Guide/Timers) |
|
(No difference)
|
Revision as of 12:56, 13 August 2020
This article is actively undergoing a major edit. The user who added this notice will be listed in its edit history should you wish to contact them. |
Timers are set up to wait for a selected amount of time before executing code. It can be very useful if you want to wait a specified amount of time for something to happen in the level, such as intense countdown or to spawn / despawn particles in a dynamic way.
In order to add timer to a map, we need to use Map_AddTimer
- explains parameters*
Let’s see an example
- shows an example*
We can do more than just create a timer, we can remove timers as well, or check if a timer is already running. For example, if we enter this area, create a timer of 5 seconds. However, if a timer has already been created, we don’t need to create that timer again, right? So we can use Map_TimerExists for that.
Timers are very easy to use as you can see, and it will help us to understand the concept of Sequences in the next episode.