We no longer support  to view this web site correctly.

Data Types


Complex Types and Automatic Deletion

Many native types represent "complex" objects (i.e. larger than 4 bytes). The script language automatically keeps track of these objects and deletes them from memory when they are no longer used (that is, when nothing in the script references them any longer). The types which benefit from automatic deletion are:

  • abilcmd
  • bank
  • camerainfo
  • marker
  • order
  • playergroup
  • point
  • region
  • soundlink
  • string
  • text
  • timer
  • transmissionsource
  • unitfilter
  • unitgroup
  • unitref
  • waveinfo
  • wavetarget

Other object types must be explicitly destroyed with the appropriate native function when you are done using them.

Complex Types and Equality

Normally, comparing two "complex" objects with the == or != operators will only compare the object reference, not the contained object data. However, a few types will compare the contained data instead. These types are:

  • abilcmd
  • point
  • string
  • unitfilter
  • unitref

Examples
Point(1, 2) == Point(1, 2)                              // True
"test string" == "test string"                          // True (note: this is case sensitive)
AbilityCommand("move", 0) == AbilityCommand("move", 0)  // True
Order(abilCmd) == Order(abilCmd)                        // False (two different order instances)
RegionEmpty() == RegionEmpty()                          // False (two different region instances)

Complex Types and +/- Operators

Besides numerical types (byte, int, fixed), a few complex types support + and/or - operators:

string, text    + operator will concatenate the strings or text
point           +/- operators will add or subtract the x and y components of the points

All Data Types

  • Ability Command (abilcmd)
  • Actor (actor)
  • Actor Message (actormsg)
  • Actor Scope (actorscope)
  • AI Filter (aifilter)
  • Bank (bank)
  • Boolean (bool)
    Boolean is a value that can only be True or False.
  • Byte (byte)
  • Camera Info (camerainfo)
  • Color (color)
  • Doodad (doodad)
  • Fixed (fixed)
  • Integer (int)
    A 32-bit integer that can have the values -2147483647 (-2^31 + 1) to 2147483647 (2^31 - 1).
  • Marker (marker)
  • Order (order)
  • Player Group (playergroup)
  • Point (point)
  • Region (region)
  • Revealer (revealer)
  • Sound (sound)
  • Sound Link (soundlink)
  • String (string)
    A string is a sequence of letters, numbers, or symbols.
  • Target Filter (targetfilter)
  • Text (text)
  • Timer (timer)
  • Transmission Source (transmission)
  • Trigger (trigger)
  • Unit (unit)
  • Unit Group (unitgroup)
  • UnitFilter (unitfilter)
  • Wave (wave)
  • Wave Information (waveinfo)
  • Wave Target (wavetarget)