Difference between revisions of "Osiris/API/ObjectExists"

From Divinity Engine Wiki
Jump to: navigation, search
(Documented ObjectExists)
 
(Notes)
Line 8: Line 8:
 
===== Notes =====
 
===== Notes =====
 
* This call is only valid if a level has already been loaded.
 
* 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 [[Osiris/API/ActivatePersistentLevelTempalte|persistent level templates]]).
+
* An object exists if it is global, or local in the current level (this includes local objects from [[Osiris/API/ActivatePersistentLevelTemplate|persistent level templates]]).
 
* A character keeps existing after it dies, unless it was a [[Osiris/API/TemporaryCharacterCreateAtTrigger|temporary character]] and a savegame got reloaded after it died.
 
* A character keeps existing after it dies, unless it was a [[Osiris/API/TemporaryCharacterCreateAtTrigger|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.
 
* 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.
 
* There are no extra conditions for triggers.
 
* This call currently always returns false for splines and level templates.
 
* This call currently always returns false for splines and level templates.
 +
 
===== See Also =====
 
===== See Also =====
 
* [[Osiris/API/ItemDestroy|ItemDestroy]]
 
* [[Osiris/API/ItemDestroy|ItemDestroy]]

Revision as of 22:18, 11 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.
  • _Bool: 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