GetObjectCount: Difference between revisions

From Onset Developer Wiki
(Created page with "{{Info|Function|Server|1.0}} {{FuncDescription|__EDIT_ME__}} {{FuncSyntax|GetObjectCount()}} {{FuncParameters}} {{FuncNoParam}} {{FuncReturnValue|__EDIT_ME__}} == Example...")
 
No edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Info|Function|Server|1.0}}
{{Info|Function|Server & Client|1.0}}


{{FuncDescription|__EDIT_ME__}}
{{FuncDescription|Get the number of spawned object instances from [[CreateObject]].}}


{{FuncSyntax|GetObjectCount()}}
{{FuncSyntax|GetObjectCount()}}
Line 8: Line 8:
{{FuncNoParam}}
{{FuncNoParam}}


{{FuncReturnValue|__EDIT_ME__}}
{{FuncReturnValue|Returns total object count.}}


== Example ==
== Example ==
__EDIT_ME__
<syntaxhighlight lang="Lua>
print("Objects: " .. GetObjectCount())
</syntaxhighlight>


{{RelatedFunctions}}
{{RelatedFunctions}}
__EDIT_ME__
* [[GetObjectModelCount]]
* [[GetObjectModelGroup]]
* [[GetObjectModelName]]
* [[GetStreamedObjects]]
* [[GetObjectModel]]
* [[GetObjectLocation]]
* [[GetObjectRotation]]
* [[GetObjectScale]]
* [[GetObjectBoundingBox]]
* [[GetObjectSize]]
* [[EnableObjectHitEvents]]
* [[GetObjectMass]]
* [[SetObjectEditorSpeed]]
* [[SetObjectEditable]]
* [[SetObjectOutline]]
* [[SetObjectCastShadow]]
* [[SetObjectColor]]
* [[SetObjectEmissiveColor]]
* [[SetObjectTexture]]
* [[SetObjectAnimatedTexture]]

Latest revision as of 14:28, 26 June 2021

GetObjectCount

Type: Function
Context: Server & Client
Introduced: v1.0

Description

Get the number of spawned object instances from CreateObject.

Syntax

GetObjectCount()

Parameters

  • This function has no parameters.

Return Value

  • Returns total object count.

Example

print("Objects: " .. GetObjectCount())

See also