Difference between revisions of "Osiris/API/ObjectExists"

From Divinity Engine Wiki
Jump to: navigation, search
m
m
Line 20: Line 20:
 
* [[Osiris/API/ObjectIsItem|ObjectIsItem]]
 
* [[Osiris/API/ObjectIsItem|ObjectIsItem]]
 
   
 
   
[[Category:Osiris Queries|CharacterIsAlly]]
+
[[Category:Osiris Queries|ObjectExists]]

Revision as of 18:47, 12 January 2018

Full Definition(s)
  • query ObjectExists([in](GUIDSTRING)_Object, [out](INTEGER)_Exists)
Description

Returns whether or not_Object is a reference to a character, item, or trigger that exists in the current context.

Return Values
  • Success/Failure: Default return value.
  • _Exists: 1 if _Object is a character, item, or trigger that exists in the current context, and 0 otherwise.
Notes
  • This call is only valid if a level has already been loaded.
  • An object exists if it is global, or local in the current level (this includes local objects from persistent level templates).
  • A character keeps existing after it dies, unless it was a temporary character and a savegame got reloaded after it died.
  • Static items never exist, only dynamic items. An dynamic item stops existing when it gets destroyed if its "Template After Destruction" is not set in the "Destroy Parameters" of its "Destroy Actions" in the side bar. If it does have a "Template After Destruction", it keeps existing after destruction.
  • There are no extra conditions for triggers.
  • This call currently always returns false for splines and level templates.
See Also