ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.

CellTags

From ModEnc
Jump to navigation Jump to search
This page should correctly be named "[CellTags]"; it is wrong due to technical restrictions.



CellTags are a method of marking cells on a map for scripting. The index to the left of the equal sign is a combination of map X/Y coordinates, while the value on the right is the index of an attached tag in the [Tags] section of the map. This can then be used to activate a tag when a unit moves onto the cell, something used extensively in the singleplayer campaign maps.

The [CellTags] section takes the following format: COORDS=TAG_INDEX

The COORDS value depends on the value of [Basic]NewINIFormat=, when it's less than four, the number is calculated Y * 128 + X, for format 4 or 5 it is calculated Y * 1000 + X. For example, in Red Alert 2, maps use NewINIFormat=5, and a cell (X,Y) location of 34,140, would be 140034.

The TAG_INDEX in this case would refer to the matching object defined under [Tags] in the map, and ultimately link to the Triggers.

Normally CellTags are placed (or removed) graphically in a map editor such as FinalSun or FA2sp, so there should be little reason to edit this section, except to entirely remove it.

Bugs/Side-Effects/Unexpected Limitations

In Tiberian Sun, CellTags are not triggered by cloaked units entering or leaving the cell.

Not all Events that make use of CellTags will be activated by hovering/flying units passing over them.

See Also

Waypoints

AITriggerTypes