Difference between revisions of "Osiris/API/ApplyStatus"

From Divinity Engine Wiki
Jump to: navigation, search
m
m
 
(One intermediate revision by the same user not shown)
Line 14: Line 14:
 
** ignore physical armor, which normally blocks '''KNOCKED_DOWN'''
 
** ignore physical armor, which normally blocks '''KNOCKED_DOWN'''
 
** not apply the '''KNOCKED_DOWN''' status, but instead remove the '''RESTED''' status (since that status and '''KNOCKED_DOWN''' cancel each other out)
 
** not apply the '''KNOCKED_DOWN''' status, but instead remove the '''RESTED''' status (since that status and '''KNOCKED_DOWN''' cancel each other out)
 +
* The duration of a single combat round is 6.0 seconds
 
===== See Also =====
 
===== See Also =====
 
* [[Osiris/API/CharacterStatusApplied|CharacterStatusApplied]]
 
* [[Osiris/API/CharacterStatusApplied|CharacterStatusApplied]]
Line 23: Line 24:
 
* [[Osiris/API/ItemStatusChange|ItemStatusChange]]
 
* [[Osiris/API/ItemStatusChange|ItemStatusChange]]
 
* [[Osiris/API/ItemStatusRemoved|ItemStatusRemoved]]
 
* [[Osiris/API/ItemStatusRemoved|ItemStatusRemoved]]
 +
* [[Osiris/API/RemoveHarmfulStatuses|RemoveHarmfulStatuses]]
 +
* [[Osiris/API/RemoveStatus|RemoveStatus]]
  
 
[[Category:Osiris Calls|ApplyStatus]]
 
[[Category:Osiris Calls|ApplyStatus]]

Latest revision as of 14:17, 7 June 2019

Full Definition(s)
  • (Shared mod) call ApplyStatus((GUIDSTRING)_Object, (STRING)_Status, (REAL)_Duration)
  • (Shared mod) call ApplyStatus((GUIDSTRING)_Object, (STRING)_Status, (REAL)_Duration, (INTEGER)_Force)
  • call ApplyStatus((GUIDSTRING)_Object, (STRING)_Status, (REAL)_Duration, (INTEGER)_Force, (GUIDSTRING)_Source)
Description

Applies the status with stats name _Status to _Object, which can either be a character or an item. The status will last for _Duration seconds. If _Duration is -1.0, it will last until explicitly removed by either script or another status/effect interaction (e.g. a permanent BURNING status can still be removed by making the object WET).

If _Force is 1, normal status immunities are ignored (e.g., a status that is normally blocked by physical armour, can be force-applied to ignore the fact that the target may have physical armour left). If it is 0, normal status immunities apply.

(New parameter in DOS2 Patch 5) _Source specifies the object, either a character or item, that the game should consider as the source of this status effect. This is mainly useful for scripted skill applications, where you want _Object to react as if _Source applied this status. You can pass NULL_00000000-0000-0000-0000-000000000000 if there is no specific source.

Notes
  • The overloads in the Shared mod use the defaults _Force = 0, and _Source = NULL_00000000-0000-0000-0000-000000000000.
  • Even when using _Force == 1, _Object may not actually have _Status after calling this routine, because another status may nullify this one. E.g., if a character has the RESTED status and you force-apply KNOCKED_DOWN, then this application will
    • ignore physical armor, which normally blocks KNOCKED_DOWN
    • not apply the KNOCKED_DOWN status, but instead remove the RESTED status (since that status and KNOCKED_DOWN cancel each other out)
  • The duration of a single combat round is 6.0 seconds
See Also