This AI is still in early stages of development.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

A few constants to make working with times more semantic...

 

Millisecond conversions

If you're working in milliseconds, these constants are useful:

  • SECONDS – eg. 12 * SECONDS would give a value of 12000 milliseconds
  • MINUTES – eg. 5 * MINUTES would give a value of 300000 milliseconds

Second conversions

If you're working in seconds, these constants are useful:

  • SECS – eg. 12 * SECS would give a value of 12 seconds.
  • MINS – eg. 5 * MINS would give a value of 300 seconds.

Notes

In Warzone 3.1, setMissionTime() used time units of 1/10th of a second, which sounds odd until you realise that's the interval of a game tick and also the update rate of gameTime. It was very confusing unit to work with, so in Warzone 3.2 such functions were updated to use seconds.

Availability BETA

Requires:

Contents

Jump to:

See also

Milliseconds:

  • now – get current real-world time specified in milliseconds
  • setTimer() – call a function on a repeating interval specified in milliseconds
  • queue() – call a function after a delay specified in milliseconds

Seconds:

 

  • No labels