TIME
EVENTS (TM)
RECEIVER
This is the ERM equivalent for time events. It may be used to repeat any ERM code at regular intervals (or only once) and to start and stop at a specified time.
The TM receiver is used in conjunction with the !?TM trigger ( !?TM$;), where $ from 1 to 100 is the number of the timer.
Note: This command is almost always used as an instruction to set up the timer, rather than a receiver (although it could be used as a receiver)
!!TM#:XXXX; |
This is for setting up timed ERM events. # = timer number (1-100). |
OPTIONS | |
D$; | Disable player colour $ to receive this timer. See Format E1. |
E$; | Enable player colour $ to receive this timer. See Format E1. |
S$1/$2/$3/$4; | Set/check/get timer set. $1 - The first day (activating) $2 - The last day $3 - The interval (in days) of happening. I.e. 1 would mean it activates every day, 7 would mean every 7 days, etc. $4 - Colours to whom it will be applied (one bit is one colour, see Format E). Example: 13=8+4+1 will set for Red, Brown and Green (0 will disable all colours). |
Comments:
Be careful if you enable one timer for several colours. If one
of the timer receivers shows a message, you can get it twice or
more times..
The TM timer will not activate properly on the very first day when a map is played, so if you want ERM code (receivers) to do something on the very first day, it is better to link them to something else such as a local event or a day 1 general (timed) event.
Example
We want to create a new object with ERM code.
This object can only be visited once each week. How do we proceed?
In the object's code you can set a flag so that
once it has been visited, it can't be visited again.
!#TM1:S1/999/7/player;
timer will be called on every Day 1.
!?TM1;
!!... Here you can reset the flag for the object so that it can be visited once
again.