This little code snippet is for making easy triggers for example if you want a monster to spawn after a certain time frame, you just type like this:

IF trigger(1, 2) THEN SpawnEnemy()
This starts the trigger #1 and will trigger first time after two seconds and then keep triggering once every two seconds.

IF trigger(1, 2, 3) THEN Show_blip()
This is a special trigger, it will keep returning false until it triggers, then it will return true until it triggers a second time and start over from the beginning. First number is the trigger ID as usual, second and third parameter is the time to the first and second trigger event. This example will return false for two seconds and then return true for three seconds

Download trigger source

This code is intended for GL Basic.

Leave a Reply