SC2Mapster Wiki
Register
Advertisement

If you want to create an action or function page, use this Template. If you want to create a new trigger category page, use this Template.


Trigger Elements[]

Ui-editoricon-general triggers Trigger Editor Overview Ui-editoricon-triggereditor newevent Events
Ui-editoricon-triggereditor newcondition Conditions Question Functions
Ui-editoricon-triggereditor newvariable Variables And Records Ui-editoricon-triggereditor newvariable Data Types
Ui-editoricon-triggereditor newpresettype Presets/Constants Ui-editoricon-triggereditor newaction Actions


Data Types[ | ]

About Types[ | ]

Types are used by Variables, Functions, Presets and User Types for the game engine to store and reference specific kinds of data. In other words, integer variables can only store integers, and unit variables can only store units. The Parameters of Definitions require specific types to be defined to operate and Functions will only return values for specific parameter types. Some Conversion functions for the conversion of data between types do exist but the conversion of some types is less straight forward eg. the Point type.

Complex Types and Automatic Deletion[ | ]

A number of types represent "complex" objects (i.e. objects larger than 4 bytes). These objects are larger than the maximum variable size (4 bytes) so have to be stored externally with a reference used to locate them. StarCraft II automatically keeps track of these objects and deletes them from memory when they are no longer referenced by the Galaxy virtual machine. Other types require that they be explicitly destroyed with the appropriate native function when no longer needed.

Types Affected by Automatic Deletion:[ | ]
  • abilcmd (Ability Command)
  • bank (Bank)
  • camerainfo (Camera Info)
  • marker (Marker)
  • order (Order)
  • playergroup (Player Group)
  • point (Point)
  • region (Region)
  • soundlink (Sound Link)
  • string (String)
  • text (Text)
  • timer (Timer)
  • transmissionsource (Transmission Source)
  • unitfilter (Unit Filter)
  • unitgroup (Unit Group)
  • unitref (Unit Reference)
  • waveinfo (Wave Info)
  • wavetarget (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.

These types are:

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 + or - Operators[ | ]

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

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

Primitive Types[ | ]

Game Types[ | ]

  • Ability Command
  • Actor
  • Actor Message
  • Actor Scope
  • AI Filter
  • AI Personality
  • AI Personality Attack Wave
  • Animation Length Query
  • Animation Name
  • Attribute ID (Game)
  • Attribute ID (Player)
  • Attribute Value
  • Bank
  • Camera Object
  • Catalog Entry
  • Catalog Field Name
  • Catalog Field Path
  • Catalog Reference
  • Catalog Scope
  • Charge Link
  • Cinematic
  • Color
  • Conversation
  • Conversation Character
  • Conversation Line
  • Conversation Reply
  • Conversation State Index
  • Conversation Tag
  • Cooldown Link
  • Cutscene
  • Dialog
  • Dialog Item
  • Difficulty Level
  • Doodad
  • Effect History
  • File
  • Font Style
  • Game Link
  • Game Option
  • Game Option Value
  • Game User Id
  • Generic Handle
  • Help Item
  • Leaderboard
  • Marker
  • Mercenary
  • Mission Archive
  • Model Camera
  • Objective
  • Order
  • Path Display
  • Ping
  • Planet
  • Player Color
  • Player Group
  • Point
  • Portrait
  • Purchase Category
  • Purchase Group
  • Purchase Item
  • Region
  • Research Category
  • Research Item
  • Research Tier
  • Revealer
  • Sound
  • Sound Link
  • Stat Event
  • String
  • Target Filter
  • Text
  • Text Tag
  • Time Of Day
  • Timer
  • Timer Window
  • Transmission
  • Transmission Source
  • Trigger
  • UI Layout Frame
  • UI Layout Frame (Relative)
  • Unit
  • Unit Filter
  • Unit Group
  • Unit Type
  • User Data Field
  • User Data Instance
  • Water
  • Wave
  • Wave Info
  • Wave Target
  • Wave Timer Window

Other[ | ]

  • Battle Report
  • Room Button
  • Handle
  • Any Compare
  • Any Number
  • Same As
  • Preset
  • Void
Advertisement