Osiris/API/CharacterSetForceUpdate

From Divinity Engine Wiki
Revision as of 15:09, 20 September 2017 by Tinkerer (talk | contribs)
Jump to: navigation, search
Full Definition(s)
  • call CharacterSetForceUpdate((CHARACTERGUID)_Character, (INTEGER)_Bool)
Description

Reactions from behaviour scripts are only active if at least one player character is "nearby" (currently: within 30 meters). This routine can be used to force _Character's reactions to remain active even if no player character are nearby, by passing 1 as _Bool. Once the character's behaviours no longer need to remain permanently active, you can make its activity status again depend on the nearness of a player character by calling it with 0 as _Bool.

Notes
  • Use this functionality very sparingly, as it can easily lead to a lot of unnecessary overhead.
  • If this function is called while the character was inactive, it will not make it active. It will only keep the character active once it has become active due to a player being nearby, or if it receives an event.
  • Characters that are in combat are automatically force updated for the duration of the combat.
  • There is no similar call for items.
See Also