TriggerAddEventMapInit
void TriggerAddEventMapInit (trigger t);
Register a trigger that will be executed on map initialization.
Parameters
- trigger t
The trigger that will be executed. Must have the following prototype:
bool name(bool checkConds, bool doActions);
- checkConds : always true?
- doActions : always true?
- The return value is used to increment either FailedConditions (when false) or Run in the debug trigger window
Examples
- Example: Run script every X seconds
// Define the trigger function bool TriggerTiming (bool checkConds, bool doActions) { while (1) { // Do something every 5 seconds Wait(5, 0); } } void InitMap () { // Create a new trigger based off the function trigger t = TriggerCreate("TriggerTiming"); // Run it at map initialization TriggerAddEventMapInit (t); }