Skip to content

zCTrigger

Quick Infos

Class Name: zCTrigger
Version Identifiers:
β€” Gothic I: 47105
β€” Gothic II: 47105
Sources:
β€” spacerhilfedatei.sph
β€” gothic-library.ru
β€” zk.gothickit.dev

VObject to process and relay specific filtered events. When a zCTrigger receives an OnTrigger, OnDamage, or OnTouch event it checks whether the event source (an oCNpc, the player or another VObject) should be acknowledged (see respondToNPC, respondToPC and respondToObject respectively). It then verifies if it should react to the specific event by checking the reactToOnTrigger, reactToOnDamage and reactToOnTouch properties. If both checks succeed, an OnTrigger event is sent to the triggerTarget and the trigger is considered to be activated. zCTrigger objects can be enabled and disabled by firing OnEnable, OnDisable and OnToggleEnabled events at them.

Tip

The respondTo{Object,PC,NPC,VobName} properties are logically linked by and "or" expression.

Class members

Class member overview

reactToOnTrigger

Whether this trigger should react to OnTrigger events.

Accepted values:

  • TRUE β€” Do react to OnTrigger events by sending an OnTrigger message to the triggerTarget If sendUntrigger is set to TRUE, also sends an OnUntrigger event to the triggerTarget if the trigger receives an OnUntrigger event.
  • FALSE β€” Ignore OnTrigger events.

reactToOnTouch

Whether this trigger should react to OnTouch events.

Accepted values:

  • TRUE β€” Do react to OnTouch events by sending an OnTrigger message to the triggerTarget If sendUntrigger is set to TRUE, also sends an OnUntrigger event to the triggerTarget if the trigger receives an OnUntouch event.
  • FALSE β€” Ignore OnTouch events.

reactToOnDamage

Whether this trigger should react to OnDamage events.

Accepted values:

  • TRUE β€” Do react to OnDamage events by sending an OnTrigger message to the triggerTarget
  • FALSE β€” Ignore OnDamage events.

respondToObject

Whether this trigger should process events coming from inanimate objects.

Accepted values:

  • TRUE β€” Do process events from inanimate objects.
  • FALSE β€” Ignore events from inanimate objects.

respondToPC

Whether this trigger should process events coming from the player.

Accepted values:

  • TRUE β€” Do process events from the player.
  • FALSE β€” Ignore events from the player.

respondToNPC

Whether this trigger should process events coming from NPCs.

Accepted values:

  • TRUE β€” Do process events from NPCs.
  • FALSE β€” Ignore events from NPCs.

startEnabled

Determines whether the trigger is initially enabled. Enabled triggers will process incoming events and send outgoing events while disabled triggers do not. Triggers can be activated and deactivated at runtime by sending them OnEnable, OnDisable or OnToggleEnabled events.

Accepted values:

  • TRUE β€” Enable the trigger when the world is loaded.
  • FALSE β€” Do not enable the trigger when the world is loaded.

respondToVobName

Whether this trigger should process events coming from VObjects with this name. If empty, match no VObject name directly.

numCanBeActivated

The number of times the trigger will process incoming events. If set to -1 the trigger will process an infinite number of events.

retriggerWaitSec

The number of seconds that have to elapse after processing an event before the trigger will process additional events. All events received by the trigger during that time are ignored.

damageThreshold

The amount of damage which must be dealt for the trigger to react to an OnDamage event.

fireDelaySec

The number of seconds to wait before emitting the OnTrigger event after processing.

sendUntrigger

Whether to send and OnUntrigger event to the triggerTarget after the trigger receives an OnUntrigger or OnUntouch event. Only fires the OnUntrigger event if reactToOnTrigger and reactToOnTouch are set to TRUE respectively.

nextTimeTriggerable

Unknown.

Warning

This property is only available in saved games.

savedOtherVob

Unknown.

Warning

This property is only available in saved games.

countCanBeActivated

Unknown.

Warning

This property is only available in saved games.

isEnabled

Unknown.

Warning

This property is only available in saved games made using Gothic II.