Difference between revisions of "Tag"
(Created page with "'''Tags''' are a way of referring to Actors while playing a deck. Tags consist of a word, such as '''#wall''' or '''#player''', which can then be referenced inside [...") |
m |
||
Line 8: | Line 8: | ||
== Common uses for tags == | == Common uses for tags == | ||
=== Colliding with certain actors === | === [[Collision|Colliding]] with certain actors === | ||
The [[Trigger]] for '''When this collides with an actor''' has an optional '''tag''' parameter. For example, if you want to do something when the player hits a wall (but not any other time), you could change the trigger to '''When this collides with tag #wall'''. Now the trigger will only fire when the player hits actors tagged '''#wall'''. | The [[Trigger]] for '''When this collides with an actor''' has an optional '''tag''' parameter. For example, if you want to do something when the player hits a wall (but not any other time), you could change the trigger to '''When this collides with tag #wall'''. Now the trigger will only fire when the player hits actors tagged '''#wall'''. | ||
Revision as of 23:47, 12 May 2022
Tags are a way of referring to Actors while playing a deck. Tags consist of a word, such as #wall or #player, which can then be referenced inside Rules.
Adding and removing tags
When editing a deck, you can add tags to a Blueprint by opening the Inspector and navigating to the General tab. Blueprints can have many tags. All actors created from this blueprint will begin with this set of tags.
While a deck is playing, you can use the Add tag and Remove tag Responses to change tags on specific actors.
Common uses for tags
Colliding with certain actors
The Trigger for When this collides with an actor has an optional tag parameter. For example, if you want to do something when the player hits a wall (but not any other time), you could change the trigger to When this collides with tag #wall. Now the trigger will only fire when the player hits actors tagged #wall.
Telling certain actors to do something
The Tell actors with tag Response causes only those actors to perform whatever logic you want. For example, to destroy all oxen in the card, you can say: Tell all actors with tag #ox: Destroy this actor.
Moving toward another actor
The Move toward another actor Response can be filtered by tag. For example, to make the enemies chase the player, you could say: Move toward the closest actor with tag #player.