TriggerOnceIf

TriggerOnceIf

A one-shot trigger that fires only when the player does possess the specified flag or item. Once it fires it removes itself, so it will never fire again.

Typical use: gate an event or reward on the player already carrying a required item — e.g. react to the player arriving at a location while holding the Chalice, then vanish so the scene plays out only once.

Constructor

new TriggerOnceIf(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 presence 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

TriggerOnceIf

Members

terrain :Terrain

Source:
Overrides:
Type:

Methods

getProxiedTerrain()

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

Source:
Overrides: