SC2Mapster.com Wiki

AIGetTime

native fixed AIGetTime ();

Elapsed AI time.

Return the elapsed AI time. In the beta it is in seconds but may be subject to change.

Return value

fixed - Elapsed AI time

Examples

Example: Run script every X seconds
// Define the trigger function
bool TriggerTiming (bool checkConds, bool doActions) {
  while (1) {
    // Display the time elapsed every 5 seconds
    TriggerDebugOutput(3, 
      StringToText(IntToString(FixedToInt(AIGetTime())), false);
    Wait(5, 0);
  }
}

// Create a new trigger based off the function
trigger t = TriggerCreate("TriggerTiming");

// Run it at map initialization
TriggerAddEventMapInit (t);

See also

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

Facts

Date created
Mar 09, 2010

Author