SC2Mapster.com Wiki

Galaxy / Triggers / Category:Types

Data Types

About Types

Complex Types and Automatic Deletion

A number of types represent "complex" objects (i.e. objects larger than 4 bytes). Starcraft 2 automatically keeps track of these objects and deletes them from memory when they are no longer referenced by the script. Other types require that they be explicitly destroyed with the appropriate native function when no longer needed.

Types Affected by Automatic Deletion:
  • Ability Command
  • Bank
  • Camera Info
  • Color
  • Marker
  • Order
  • Player Group
  • Point
  • Region
  • Sound Link
  • String
  • Text
  • Timer
  • Transmission Source
  • Unit Filter
  • Unit Group
  • Unit References
  • Wave Info
  • Wave Target

Complex Types and Equality

Comparing two "complex" objects with the == or != operators will only compare the object reference, not the contained object data in most cases. However, a few types will compare the contained data instead including:

  • Ability Command
  • Color
  • Point
  • String
  • Unit Filter
  • Unit References
Examples:
True:
  • Point (1, 2) == Point (1, 2)
  • "String" == "String"
False:
  • Order(abilCmd) == Order(abilCmd)
  • RegionEmpty() == RegionEmpty()

Complex Types and + or - Operators

Other than numerical types (byte, int, fixed) the operators that support + and/or - operators are:

  • String (+ Concatenates the two Strings)
  • Text (+ Concatenates the two Texts)
  • Point (+ or - Adds or Subtracts the X and Y values of the Points)

Primitive Types

Game Types

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