Difference between revisions of "Tag"
m |
(Add screenshots demonstrating tags) |
||
Line 1: | Line 1: | ||
'''Tags''' are a way of referring to [[Actor|Actors]] while playing a deck. Tags consist of a word, such as '''#wall''' or '''#player''', which can then be referenced inside [[Rule|Rules]]. | '''Tags''' are a way of referring to [[Actor|Actors]] while playing a deck. Tags consist of a word, such as '''#wall''' or '''#player''', which can then be referenced inside [[Rule|Rules]]. | ||
[[File:Inspector-tags.jpg|alt=A screenshot of the inspector showing the #ball tag for a golf ball blueprint|thumb|A screenshot of the [[Inspector]] showing a blueprint with the tag '''#ball''']] | |||
== Adding and removing tags == | == Adding and removing tags == | ||
Line 9: | Line 10: | ||
=== [[Collision|Colliding]] with certain actors === | === [[Collision|Colliding]] with certain actors === | ||
[[File:Rule-tag-collision.jpg|alt=A screenshot of a collision trigger that filters by tag|thumb|An example of a collision trigger filtering by tag '''#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'''. | 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'''. | ||
Latest revision as of 17:26, 17 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.