TriggerIfNot

TriggerIfNot

Fires a color event (and optional message) when the player steps on it, but only when the player does not possess the specified flag or item. Persistent — fires every time the condition is met.

Constructor

new TriggerIfNot(terrain, test, color, message)

Source:
Parameters:
Name Type Description
terrain Terrain

The underlying terrain this decorator wraps.

test string

Flag name or item name whose absence allows the trigger to fire.

color Color

Color event broadcast to the board on firing.

message string | null

Optional modal message shown to the player.

Extends

Classes

TriggerIfNot

Members

terrain :Terrain

Source:
Overrides:
Type:

Methods

getProxiedTerrain()

Description:
  • Return the terrain being wrapped (TerrainProxy interface).

Source:
Overrides:

onEnterInternal(event, player, cell, dir)

Description:
  • Fires the trigger if the player does not have the tested flag or item. Skips silently when the event is already cancelled or when the player possesses the test value.

Source:
Overrides:
Parameters:
Name Type Description
event GameEvent
player Player
cell Cell
dir Direction