Skip to main content

Script-Trigger

script-trigger is executed when a marker is triggered (the player is within triggerRange and autoTrigger is on or the player has pressed their interact key).

note

Just being within the triggerRange is not enough to cause this to execute, it must be triggered either manually or by autoTrigger!

Default Parameters

ParameterTypeDescription
markerMarkerA reference to the marker firing the script.
isAutoTriggerbooleanA reference to the current gameTime object.

Usage

pack.xml
<marker ... script-tick="DoSomethingWhenTriggered(1)" autoTrigger="1">
<marker ... script-tick="DoSomethingWhenTriggered(2)" autoTrigger="0">