Difference between revisions of "Osiris/API/TriggerRegisterForPlayers"

From Divinity Engine Wiki
Jump to: navigation, search
m (Updated event trigger link)
m
 
(8 intermediate revisions by 2 users not shown)
Line 2: Line 2:
 
* call '''TriggerRegisterForPlayers'''(''(TRIGGERGUID)'''''_Trigger''')
 
* call '''TriggerRegisterForPlayers'''(''(TRIGGERGUID)'''''_Trigger''')
 
===== Description =====
 
===== Description =====
Ensures that whenever a player character enters '''_Trigger''', a [[Osiris/API/CharacterEnteredTrigger|CharacterEnteredTrigger]] event will be thrown for this trigger/character combination.
+
Registers the '''_Trigger''' for all '''''current''''' player characters, so that that whenever one of them enters or leaves the '''_Trigger''', a [[Osiris/API/CharacterEnteredTrigger|CharacterEnteredTrigger]] resp. [[Osiris/API/CharacterLeftTrigger|CharacterLeftTrigger]] event will be thrown for this trigger/character combination.
===== Return Values =====
 
* None
 
 
===== Notes =====
 
===== Notes =====
* [[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 can not be unregistered.
 +
* [[Osiris/Shared/ProcTriggerRegisterForPlayers|ProcTriggerRegisterForPlayers]] ensures that the '''_Trigger''' is also registered for characters who become players at a later point (i.e. characters recruited into the party), and unregistered again when player characters are dismissed. Use that procedure rather than the '''TriggerRegisterForPlayers''' call directly.
 
===== See Also =====
 
===== See Also =====
 
* [[Osiris/API/CharacterEnteredTrigger|CharacterEnteredTrigger]]
 
* [[Osiris/API/CharacterEnteredTrigger|CharacterEnteredTrigger]]
Line 15: Line 14:
 
* [[Osiris/API/TriggerLaunchIterator|TriggerLaunchIterator]]
 
* [[Osiris/API/TriggerLaunchIterator|TriggerLaunchIterator]]
 
* Helper [[Osiris/Shared/DB_InRegion|DB_InRegion]]
 
* Helper [[Osiris/Shared/DB_InRegion|DB_InRegion]]
 +
* Helper[[Osiris/Shared/DB_TriggerSendsSpotEvents|DB_TriggerSendsSpotEvents]]
 +
* Helper [[Osiris/Shared/ProcTriggerRegisterForPlayers|ProcTriggerRegisterForPlayers]]
 +
* Helper [[Osiris/Shared/ProcTriggerUnregisterForPlayers|ProcTriggerUnregisterForPlayers]]
  
[[Category:Osiris Calls]]
+
[[Category:Osiris Calls|TriggerRegisterForPlayers]]

Latest revision as of 11:40, 1 November 2018

Full Definition(s)
  • call TriggerRegisterForPlayers((TRIGGERGUID)_Trigger)
Description

Registers the _Trigger for all current player characters, so that that whenever one of them enters or leaves the _Trigger, a CharacterEnteredTrigger resp. CharacterLeftTrigger event will be thrown for this trigger/character combination.

Notes
  • Event triggers are automatically registered for all characters by the engine and can not be unregistered.
  • ProcTriggerRegisterForPlayers ensures that the _Trigger is also registered for characters who become players at a later point (i.e. characters recruited into the party), and unregistered again when player characters are dismissed. Use that procedure rather than the TriggerRegisterForPlayers call directly.
See Also