TriggerCreate
native trigger TriggerCreate (string name);
Create a new trigger from a function
Parameters
- string name
Name of the function you want to be "triggerized". It must be of the form
bool TriggerName (bool checkConds, bool doActions)
Return value
trigger - A trigger corresponding to the function
Examples
- Example: Initialization Trigger
// Define the trigger function bool TriggerCustom (bool checkConds, bool doActions) { if (checkConds && doActions) { // Do Something } } // Create a new trigger based off the function trigger t = TriggerCreate("TriggerCustom"); // Run it at map initialization TriggerAddEventMapInit (t);