Difference between revisions of "Osiris/API/SetCanJoinCombat"

From Divinity Engine Wiki
Jump to: navigation, search
(Osiris Core APIs)
 
m
 
(4 intermediate revisions by 2 users not shown)
Line 4: Line 4:
 
Sets whether or not '''_Target''' can enter combats depending on whether '''_Enabled''' is 0 or 1.
 
Sets whether or not '''_Target''' can enter combats depending on whether '''_Enabled''' is 0 or 1.
 
===== Notes =====
 
===== Notes =====
* Entering a combat means "participating in the turn order of a combat", i.e., not moving around in real time while nearby characters/items are in a combat. It does not mean that the character/item will also actively participate in the combat (perform actions during its turns in a combat). Controlling whether or not a character/item in a combat will do so happens using the '''SetCanFight''' call.
+
* Joining a combat means "participating in the turn order of a combat", i.e., not moving around in real time while nearby characters/items are in a combat. It does not mean that the character/item will also actively participate in the combat (perform actions during its turns in a combat). Controlling whether or not a character/item in a combat will do so happens using the [[Osiris/API/SetCanFight|SetCanFight]] call.
* If '''_Target''' is currently in a combat and 0 is passed to '''_Enabled''', '''_Target''' will leave combat.
+
* If '''_Target''' is currently in a combat and 0 is passed to '''_Enabled''', '''_Target''' will leave this combat immediately.
 
* Disabling this can easily wreak havoc due to interactions with other systems, such as the crime system.
 
* Disabling this can easily wreak havoc due to interactions with other systems, such as the crime system.
 
* If you disable this for a player during a scripted event, ensure it is re-enabled in all possible exits!
 
* If you disable this for a player during a scripted event, ensure it is re-enabled in all possible exits!
 
===== See Also =====
 
===== See Also =====
* [[Osiris/API/LeaveCombat]]
+
* [[Osiris/API/LeaveCombat|LeaveCombat]]
* [[Osiris/API/SetCanFight]]
+
* [[Osiris/API/SetCanFight|SetCanFight]]
 +
* [[Osiris/API/CharacterCanFight|CharacterCanFight]]
 
   
 
   
[[Category:Osiris Calls]]
+
[[Category:Osiris Calls|SetCanJoinCombat]]

Latest revision as of 20:13, 4 February 2018

Full Definition(s)
  • call SetCanJoinCombat((GUIDSTRING)_Target, (INTEGER)_Enabled)
Description

Sets whether or not _Target can enter combats depending on whether _Enabled is 0 or 1.

Notes
  • Joining a combat means "participating in the turn order of a combat", i.e., not moving around in real time while nearby characters/items are in a combat. It does not mean that the character/item will also actively participate in the combat (perform actions during its turns in a combat). Controlling whether or not a character/item in a combat will do so happens using the SetCanFight call.
  • If _Target is currently in a combat and 0 is passed to _Enabled, _Target will leave this combat immediately.
  • Disabling this can easily wreak havoc due to interactions with other systems, such as the crime system.
  • If you disable this for a player during a scripted event, ensure it is re-enabled in all possible exits!
See Also