Difference between revisions of "Osiris/API/ApplyStatus"

From Divinity Engine Wiki
Jump to: navigation, search
(Documented ApplyStatus)
 
m (Link CharacterUseSkill)
Line 17: Line 17:
 
* [[Osiris/API/CharacterStatusAttempt|CharacterStatusAttempt]]
 
* [[Osiris/API/CharacterStatusAttempt|CharacterStatusAttempt]]
 
* [[Osiris/API/CharacterStatusRemoved|CharacterStatusRemoved]]
 
* [[Osiris/API/CharacterStatusRemoved|CharacterStatusRemoved]]
 +
* [[Osiris/API/CharacterUseSkill|CharacterUseSkill]]
 
* [[Osiris/API/HasActiveStatus|HasActiveStatus]]
 
* [[Osiris/API/HasActiveStatus|HasActiveStatus]]
 
* [[Osiris/API/ItemStatusAttempt|ItemStatusAttempt]]
 
* [[Osiris/API/ItemStatusAttempt|ItemStatusAttempt]]

Revision as of 15:03, 26 November 2017

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

Applies the status with 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.

_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 _Source parameter is new in DOS2 Patch 5.
  • There are overloads in the shared mod for this call without the _Force and/or _Source parameters for backwards compatibility. They use the defaults 0 and NULL_00000000-0000-0000-0000-000000000000, respectively.
  • 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 blocks KNOCKED_DOWN)
See Also