untag
untag <player> <string>
Remove a marker tag from a player.
untag is the inverse of tag: it clears one named marker from a
player's tag set. Tags are tested with the predicate
hastag. Removing a tag the player does not have is harmless.
Arguments
<player>— a player creature. Tags live on players only; passing an NPC is a run-time error, so guard withisplayerwhen the creature might be a mob.<string>— the marker name to clear.
Returns
null. Like the other action commands, a
successful untag in the handle phase suppresses the event's default
action.
Examples
after command (say) {
require [isplayer $actor]
untag $actor "greeted"
}
The require guard keeps the handler from running for
NPCs; the player's greeted marker is then cleared so a later greeting can
fire again.
See also
tag— add a marker tag to a player.hastag— test whether a player has a marker tag.isplayer— guarduntagagainst NPC arguments.- Persistent state — tags versus stored values.