SC2Mapster.com Wiki

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);

You must login to post a comment. Don't have an account? Register to get one!

Facts

Date created
05 Mar 2010
Last updated
10 Mar 2010

Author