Difference between revisions of "Osiris/API/TriggerRegisterForCharacter"

From Divinity Engine Wiki
Jump to: navigation, search
m (Updated event trigger link)
m
 
(3 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
* call '''TriggerRegisterForCharacter'''(''(TRIGGERGUID)'''''_Trigger''', ''(CHARACTERGUID)'''''_Character''')
 
* call '''TriggerRegisterForCharacter'''(''(TRIGGERGUID)'''''_Trigger''', ''(CHARACTERGUID)'''''_Character''')
 
===== Description =====
 
===== Description =====
Ensures that whenever a '''_Character''' enters '''_Trigger''', a [[Osiris/API/CharacterEnteredTrigger|CharacterEnteredTrigger]] event will be thrown for this trigger/character combination.
+
Ensures that whenever '''_Character''' enters resp. leaves '''_Trigger''', a [[Osiris/API/CharacterEnteredTrigger|CharacterEnteredTrigger]] resp. [[Osiris/API/CharacterLeftTrigger|CharacterLeftTrigger]] event will be thrown for this trigger/character combination.
 
===== Return Values =====
 
===== Return Values =====
 
* None
 
* None
 
===== Notes =====
 
===== Notes =====
* If you register a trigger for a character while the character is currently inside the trigger, a [[Osiris/API/CharacterEnteredTrigger|CharacterEnteredTrigger]] event will also be thrown.
+
* If you register a trigger for a character while the character is currently inside the trigger, a [[Osiris/API/CharacterEnteredTrigger|CharacterEnteredTrigger]] [[Osiris/API/CharacterLeftTrigger|CharacterLeftTrigger]] event will also be thrown. This even holds for characters placed in the editor and triggers registered in the INIT section of a story goal that gets initialised once the [[Osiris/API/RegionStarted|RegionStarted]] event for its containing level has executed.
 
* [[Triggers#Event_Trigger|Event]] triggers are automatically registered for all characters by the engine and should not be manually registered/unregistered.
 
* [[Triggers#Event_Trigger|Event]] triggers are automatically registered for all characters by the engine and should not be manually registered/unregistered.
 
===== See Also =====
 
===== See Also =====
Line 17: Line 17:
 
* Helper [[Osiris/Shared/DB_InRegion|DB_InRegion]]
 
* Helper [[Osiris/Shared/DB_InRegion|DB_InRegion]]
  
[[Category:Osiris Calls]]
+
[[Category:Osiris Calls|TriggerRegisterForCharacter]]

Latest revision as of 16:27, 19 December 2017

Full Definition(s)
  • call TriggerRegisterForCharacter((TRIGGERGUID)_Trigger, (CHARACTERGUID)_Character)
Description

Ensures that whenever _Character enters resp. leaves _Trigger, a CharacterEnteredTrigger resp. CharacterLeftTrigger event will be thrown for this trigger/character combination.

Return Values
  • None
Notes
  • If you register a trigger for a character while the character is currently inside the trigger, a CharacterEnteredTrigger CharacterLeftTrigger event will also be thrown. This even holds for characters placed in the editor and triggers registered in the INIT section of a story goal that gets initialised once the RegionStarted event for its containing level has executed.
  • Event triggers are automatically registered for all characters by the engine and should not be manually registered/unregistered.
See Also