Difference between revisions of "Osiris/API/SetCanFight"

From Divinity Engine Wiki
Jump to: navigation, search
(Osiris Core APIs)
 
m
Line 6: Line 6:
 
* 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.
 
* 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.
 
* 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, unalied enemy whose '''''CanFight''''' is disabled may therefore start and immediately end a combat.
+
* 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!
 
* 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/SetCanJoinCombat]]
+
* [[Osiris/API/SetCanJoinCombat|SetCanJoinCombat]]
 
    
 
    
 
[[Category:Osiris Calls]]
 
[[Category:Osiris Calls]]

Revision as of 22:00, 25 August 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!
See Also