IsValidObject: Difference between revisions
From Onset Developer Wiki
Created page with "{{Info|Function|Server|1.0}} {{FuncDescription|__EDIT_ME__}} {{FuncSyntax|IsValidObject(object)}} {{FuncParameters}} {{FuncParam|object|__EDIT_ME__}} {{FuncReturnValue|__E..." |
No edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
{{Info|Function|Server|1.0}} | {{Info|Function|Server & Client|1.0}} | ||
{{FuncDescription| | {{FuncDescription|Check if the specified object is valid or not.}} | ||
{{FuncSyntax|IsValidObject(object)}} | {{FuncSyntax|IsValidObject(object)}} | ||
{{FuncParameters}} | {{FuncParameters}} | ||
{{FuncParam|object| | {{FuncParam|object|The object identifier.}} | ||
{{FuncReturnValue| | {{FuncReturnValue|Returns '''true''' if the object exists..}} | ||
== Example == | == Example == | ||
<syntaxhighlight lang="Lua> | |||
if IsValidObject(objectid) then | |||
DestroyObject(objectid) | |||
end | |||
</syntaxhighlight> | |||
{{RelatedFunctions}} | {{RelatedFunctions}} | ||
{{Template:ObjectFunctions}} |
Latest revision as of 20:05, 25 March 2020
Description
Check if the specified object is valid or not.
Syntax
IsValidObject(object)
Parameters
- object
The object identifier.
Return Value
- Returns true if the object exists..
Example
if IsValidObject(objectid) then
DestroyObject(objectid)
end
See also
- CreateObject
- DestroyObject
- IsValidObject
- GetObjectCount
- GetObjectModel
- IsObjectStreamedIn
- EnableObjectStreamEvents
- SetObjectStreamDistance
- SetObjectLocation
- GetObjectLocation
- SetObjectRotation
- GetObjectRotation
- SetObjectScale
- GetObjectScale
- SetObjectAttached
- SetObjectDetached
- IsObjectAttached
- GetObjectAttachmentInfo
- IsObjectMoving
- SetObjectMoveTo
- StopObjectMove
- SetObjectRotateAxis
- GetObjectModelCount
- GetObjectMass
- GetStreamedObjects
- GetObjectBoundingBox
- GetObjectSize
- EnableObjectHitEvents
- SetObjectEditable
- SetObjectOutline
- SetObjectColor
- SetObjectEmissiveColor
- SetObjectTexture
- SetObjectAnimatedTexture
- SetObjectCastShadow
- SetObjectDimension
- GetObjectActor
- GetAllObjects
- SetObjectModel