Tagging & role handoff
The canonical WAGE mechanic: one player has a role (it), gets close to another,
asserts a tag, and the role moves.
Ingredients
Section titled “Ingredients”- An interaction with a verb, so the tag is asserted (GPS can’t see a touch).
- A rule that reacts to the verb and swaps state between
same(tagger) andother(target).
The interaction
Section titled “The interaction”interactions: - verb: tag label: "Tag" rangeMeters: 5 confirm: none initiatorFilters: [{ key: "state.it", value: true }] # only it can tag targetFilters: [{ key: "state.it", value: false }] # only non-it can be taggedconfirm: none is honor-system (instant). Switch to confirm: mutual if you want
the taggee to confirm.
The rule
Section titled “The rule”rules: - id: tag when: kind: and children: - { kind: interaction, verb: tag } # same = tagger, other = target - { kind: state_equals, who: same, key: it, value: true } - { kind: state_equals, who: other, key: it, value: false } do: - { kind: log, message: "{player} tagged {other}" } - { kind: set_state, target: same, key: it, value: false } # tagger is free - { kind: set_state, target: other, key: it, value: true } # target is now it - { kind: send_event, to: other, event: { type: toast, text: "You're it!" } }Source: apps/wage-engine/src/games/tag/game.yaml.
Variations
Section titled “Variations”- Proximity instead of a button. Replace the
interactionchild with{ kind: proximity, a: any, b: any, meters: 5 }to make the tag automatic on approach. (Then the role-state filters decide who tags whom.) Note proximity is edge-triggered, so it fires once per approach. - Infection (no handoff). For Zombie, don’t clear the tagger’s role — just set
the target’s: drop the
set_state target: sameline so tagging spreads the role instead of passing it. - Spreading via team. Set
targetFilters/teamRelationso only the right victims are taggable.
See also: Freeze & thaw for a tag that disables rather than hands off.