Difference between revisions of "Osiris/API/ObjectExists"
From Divinity Engine Wiki
(→Notes) |
m (→Notes) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
===== Return Values ===== | ===== Return Values ===== | ||
* '''Success/Failure''': Default return value. | * '''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 ===== | ===== 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/ActivatePersistentLevelTemplate|persistent level | + | * An object exists if it is global, or local in the current level (this includes local objects from [[Osiris/API/ActivatePersistentLevelTemplate|persistent level template]] instances). |
* 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. | + | * 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. | * 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. | ||
Line 17: | Line 17: | ||
* [[Osiris/API/ItemDestroy|ItemDestroy]] | * [[Osiris/API/ItemDestroy|ItemDestroy]] | ||
* [[Osiris/API/ItemRemove|ItemRemove]] | * [[Osiris/API/ItemRemove|ItemRemove]] | ||
+ | * [[Osiris/API/ObjectIsCharacter|ObjectIsCharacter]] | ||
+ | * [[Osiris/API/ObjectIsItem|ObjectIsItem]] | ||
− | [[Category:Osiris Queries| | + | [[Category:Osiris Queries|ObjectExists]] |
Latest revision as of 21:34, 14 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 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.