Skip to content

zCTrigger

Quick Infos

Type: Virtual Object
Format Name: ZenGin Archive
File Extension: .ZEN
Class Name: zCTrigger
Version Identifiers:
— Gothic I: 47105
— Gothic II: 47105
ZenKit Class: VTrigger
Sources:
spacerhilfedatei.sph
gothic-library.ru

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.

Properties

reactToOnTrigger

Whether this trigger should react to OnTrigger events.

  • 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.

  • 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.

  • 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.

  • TRUE — Do process events from inanimate objects.
  • FALSE — Ignore events from inanimate objects.

respondToPC

Whether this trigger should process events coming from the player.

  • TRUE — Do process events from the player.
  • FALSE — Ignore events from the player.

respondToNPC

Whether this trigger should process events coming from NPCs.

  • 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.

  • 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.