Difference between revisions of "Osiris/API/SetCanJoinCombat"
From Divinity Engine Wiki
(Osiris Core APIs) |
m |
||
Line 5: | Line 5: | ||
===== 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. | * 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. | ||
− | * 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]] |
[[Category:Osiris Calls]] | [[Category:Osiris Calls]] |
Revision as of 21:01, 25 August 2017
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
- 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.
- 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!