Difference between revisions of "Osiris/API/ObjectEnteredCombat"

From Divinity Engine Wiki
Jump to: navigation, search
m
Line 8: Line 8:
 
===== Notes =====
 
===== Notes =====
 
* This can be a combat that is still being set up, or an existing combat joined by a character that wandered too close.
 
* This can be a combat that is still being set up, or an existing combat joined by a character that wandered too close.
* If the combat is still being set up, not all information may be available yet (e.g., other initial objects may still be added after this one), and you cannot use APIs such as '''JumpToTurn''' yet. If you wish to perform some action when a combat has completely started, use '''CombatStarted''' instead. Note that if the combat had already been fully setup before (i.e., a [[Osiris/API/CombatStarted|CombatStarted]] even was already thrown for this combat in the past), no new [[Osiris/API/CombatStarted|CombatStarted]] event will be thrown due to this object entering.
+
* When this event gets thrown, this object's combat setup has not yet fully finished. This means you cannot yet use APIs such as [[Osiris/API/JumpToTurn|JumpToTurn]] on them. You can only use it to react in general to the object getting involved in a combat (e.g. to change alignments so that others join the combat as well).
 +
* See [[Osiris/API/ObjectReadyInCombat|ObjectReadyInCombat]] for an explanation about when you can use [[Osiris/API/JumpToTurn|JumpToTurn]].
 
===== See Also =====
 
===== See Also =====
 
* [[Osiris/API/CombatStarted|CombatStarted]]
 
* [[Osiris/API/CombatStarted|CombatStarted]]
 
* [[Osiris/API/ObjectLeftCombat|ObjectLeftCombat]]
 
* [[Osiris/API/ObjectLeftCombat|ObjectLeftCombat]]
+
* [[Osiris/API/ObjectReadyInCombat|ObjectReadyInCombat]]
 +
 
 
[[Category:Osiris Events]]
 
[[Category:Osiris Events]]

Revision as of 09:47, 13 September 2017

Full Definition(s)
  • event ObjectEnteredCombat((GUIDSTRING)_Object, (INTEGER)_CombatID)
Description

Thrown when an object (character or item) enters a combat.

Parameters
  • _Object: The object that has entered the combat
  • _CombatID: A handle that identifies the combat. Should always be > 0.
Notes
  • This can be a combat that is still being set up, or an existing combat joined by a character that wandered too close.
  • When this event gets thrown, this object's combat setup has not yet fully finished. This means you cannot yet use APIs such as JumpToTurn on them. You can only use it to react in general to the object getting involved in a combat (e.g. to change alignments so that others join the combat as well).
  • See ObjectReadyInCombat for an explanation about when you can use JumpToTurn.
See Also