Difference between revisions of "Tags"
(Tags repeat case correction) |
(Per RA1 source code and evidence from FinalAlert.) |
||
Line 21: | Line 21: | ||
The [{{Tt|Tags}}] section in a map takes this format: | The [{{Tt|Tags}}] section in a map takes this format: | ||
− | ID= | + | ID=PERSISTENCE,NAME,TRIGGER_ID |
{| style="width: 80%" border=1 class="table_descrowdesccol" | {| style="width: 80%" border=1 class="table_descrowdesccol" | ||
Line 33: | Line 33: | ||
;How should tags be attached? : see <li>[[[Structures#ts_ATTACHED_TAG|Structures]]], <li> [[[Units#ts_ATTACHED_TAG|Units]], <li> [[[Infantry#ts_ATTACHED_TAG|Infantry]]], <li> [[[Aircraft#ts_ATTACHED_TAG|Aircraft]]] and <li> [TeamTypes] {{arr|r}} [[Tag]]. | ;How should tags be attached? : see <li>[[[Structures#ts_ATTACHED_TAG|Structures]]], <li> [[[Units#ts_ATTACHED_TAG|Units]], <li> [[[Infantry#ts_ATTACHED_TAG|Infantry]]], <li> [[[Aircraft#ts_ATTACHED_TAG|Aircraft]]] and <li> [TeamTypes] {{arr|r}} [[Tag]]. | ||
|- | |- | ||
− | ! {{Anchor| | + | ! {{Anchor|PERSISTENCE|ts}} |
− | | | + | | This flag controls if and when the tag should be removed after being triggered. Once a tag has been removed, it cannot be triggered again. Applicable values are: |
− | 0 | + | * 0 = the tag is removed immediately when triggered. If the tag is attached to multiple objects, it's enough to "trip" any one of them to fire the attached trigger. |
− | 1 - | + | * 1 = the tag is semi-persistent; it maintains a count of all objects it's attached to, and only actually "springs" after it's been triggered from all the objects; then, it removes itself. |
− | 2 | + | * 2 = the tag is fully persistent; it just won't go away. |
− | + | '''Example:''' a trigger will spring when attached buildings are destroyed: | |
+ | * {{tt|0}} fires the trigger once when ''any'' of the tagged buildings is destroyed, and never again. | ||
+ | * {{tt|1}} fires the trigger once when ''all'' tagged buildings are destroyed. | ||
+ | * {{tt|2}} fires the trigger ''every time'' a tagged building is destroyed. | ||
|- | |- | ||
! {{Anchor|NAME|ts}} | ! {{Anchor|NAME|ts}} |
Revision as of 15:47, 14 September 2022
Map Tags are responsible for telling the game about the Triggers present on the map. Each trigger needs to be referred to by at least one tag to be considered "existant" by the game, even if the tag isn't attached to anything and thus never used itself. Tags can be simply placed in this section, and objects pre-placed on the map as well as TeamTypes can refer to the tags for additional functionality - if they do, those specific tags and their respective Triggers will be notified when the objects referring to them are somehow interacted with (detected, attacked, damaged, destroyed, etc.).
Contents
Section
Tiberian Dawn
Section does not exist.
Red Alert, Counterstrike, Aftermath
Section does not exist.
Tiberian Sun, Firestorm, Red Alert 2, Yuri's Revenge
The [Tags] section in a map takes this format:
ID=PERSISTENCE,NAME,TRIGGER_ID
String | Meaning |
---|---|
ID | The Tag's ID. This is used to attach this Tag to other objects on the map. |
PERSISTENCE | This flag controls if and when the tag should be removed after being triggered. Once a tag has been removed, it cannot be triggered again. Applicable values are:
Example: a trigger will spring when attached buildings are destroyed:
|
NAME | A plain text string used as a name of this Tag. Not used ingame, only in the map editor. Should not contain commas. |
TRIGGER_ID | Reference to the Trigger related to this Tag. Again, each Trigger needs to be refered to by at least one Tag or it will not work. FinalSun and FinalAlert 2 create tags for you when you press "Place on map" in the Trigger Editor. |