Difference between revisions of "Osiris/API/SetCanFight"
From Divinity Engine Wiki
m |
m |
||
Line 10: | Line 10: | ||
===== See Also ===== | ===== See Also ===== | ||
* [[Osiris/API/SetCanJoinCombat|SetCanJoinCombat]] | * [[Osiris/API/SetCanJoinCombat|SetCanJoinCombat]] | ||
− | + | ||
− | [[Category:Osiris Calls]] | + | [[Category:Osiris Calls|SetCanFight]] |
Revision as of 16:25, 19 December 2017
Full Definition(s)
- call SetCanFight((GUIDSTRING)_Target, (INTEGER)_Enabled)
Description
Sets whether _Target can fight in combats (get a turn in combats) depending on whether _Enabled is 0 or 1.
Notes
- Fighting in a combat means performing actions to heal/hurt other participants in the combat. Controlling whether or not a character/item will enter the turn-based mode of combats happens using the SetCanJoinCombatCall call.
- Disabling this for NPCs means that they will not perform any actions when it is their turn in combat. Note that this can easily wreak havoc due to interactions with other systems, such as the crime system.
- If CanFight is disabled for all enemies in combat, the combat will end immediately. Attacking a single, non-alied enemy whose CanFight is disabled may therefore start and immediately end a combat.
- If you disable this for a player during a scripted event, ensure it is re-enabled in all possible exits!