Osiris/API/ObjectExists
From Divinity Engine Wiki
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 template instances).
- 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. A 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 sidebar. 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.