Difference between revisions of "Osiris/API/ObjectReadyInCombat"
From Divinity Engine Wiki
m |
m |
||
(One intermediate revision by the same user not shown) | |||
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 [[Osiris/API/JumpToTurn|JumpToTurn]] yet. If you wish to perform some action when a combat has completely started, use [[Osiris/API/CombatStarted|CombatStarted]] instead. Note that if the combat had already been fully setup before (i.e., a [[Osiris/API/CombatStarted|CombatStarted]] | + | * 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 [[Osiris/API/JumpToTurn|JumpToTurn]] yet. If you wish to perform some action when a combat has completely started, use [[Osiris/API/CombatStarted|CombatStarted]] instead. Note that if the combat had already been fully setup before (i.e., a [[Osiris/API/CombatStarted|CombatStarted]] event was already thrown for this combat in the past), no new [[Osiris/API/CombatStarted|CombatStarted]] event will be thrown due to this object entering. |
* In practice, this event is useful to determine when you can use [[Osiris/API/JumpToTurn|JumpToTurn]] for objects joining an already ongoing combat. If you wish to use that API on objects joining a combat that has not yet started, you must wait until after the [[Osiris/API/CombatStarted|CombatStarted]] event. | * In practice, this event is useful to determine when you can use [[Osiris/API/JumpToTurn|JumpToTurn]] for objects joining an already ongoing combat. If you wish to use that API on objects joining a combat that has not yet started, you must wait until after the [[Osiris/API/CombatStarted|CombatStarted]] event. | ||
===== See Also ===== | ===== See Also ===== | ||
* [[Osiris/API/CombatStarted|CombatStarted]] | * [[Osiris/API/CombatStarted|CombatStarted]] | ||
− | * [[Osiris/API/ | + | * [[Osiris/API/ObjectEnteredCombat|ObjectEnteredCombat]] |
* [[Osiris/API/ObjectLeftCombat|ObjectLeftCombat]] | * [[Osiris/API/ObjectLeftCombat|ObjectLeftCombat]] | ||
[[Category:Osiris Events|ObjectReadyInCombat]] | [[Category:Osiris Events|ObjectReadyInCombat]] |
Latest revision as of 14:32, 13 August 2021
Full Definition(s)
- event ObjectReadyInCombat((GUIDSTRING)_Object, (INTEGER)_CombatID)
Description
Thrown when an object (character or item) has entered a combat and all combat initialisation related to this object has finished.
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.
- 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 CombatStarted event was already thrown for this combat in the past), no new CombatStarted event will be thrown due to this object entering.
- In practice, this event is useful to determine when you can use JumpToTurn for objects joining an already ongoing combat. If you wish to use that API on objects joining a combat that has not yet started, you must wait until after the CombatStarted event.