onUntag(action: (obj: GameObj , tag: string )=>void ): KEventController

Register an event that runs when an object loses a tag.

paramaction- The function that runs when the event happens.

onUnuse((obj, tag) => {
    debug.log(`A tag ${tag} was removed from the object ${obj.id}`);
});

returnsThe event controller.

sincev3001.1

groupEvents

onUntag(tag: Tag , action: (obj: GameObj , tag: string )=>void ): KEventController

Register an event that runs when an object with the provided tag loses a tag.

paramtag- The function that runs when the event happens.

onUnuse("vegetable", (obj, tag) => {
    debug.log(`A tag ${tag} was removed from the object ${obj.id}`);
});

returnsThe event controller.

sincev3001.1

groupEvents