OnObjectStreamIn: Difference between revisions

From Onset Developer Wiki
Chloe (talk | contribs)
mNo edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Info|Event|Client|1.0}}
{{Info|Event|Client & Server|1.0/1.5.0}}


{{FuncDescription|Called when an object is streamed in from the server.}}
{{FuncDescription|Called when an object is streamed in from the server.
 
'''Note: On the server you must enable this event with [[EnableObjectStreamEvents]] first.'''}}


{{FuncSyntax|OnObjectStreamIn(object)}}
{{FuncSyntax|OnObjectStreamIn(object)}}
Line 9: Line 11:


== Example ==
== Example ==
__EDIT_ME__
===Client===
<syntaxhighlight lang='Lua'>
AddEvent("OnObjectStreamIn", function (object)
    AddPlayerChat("You streamed in the object ID "..object..".")
end)
</syntaxhighlight>


{{RelatedFunctions}}
{{RelatedFunctions}}
{{ObjectClientEvents}}
{{ObjectClientEvents}}

Latest revision as of 14:33, 18 July 2021

OnObjectStreamIn

Type: Event
Context: Client & Server
Introduced: v1.0/1.5.0

Description

Called when an object is streamed in from the server.

Note: On the server you must enable this event with EnableObjectStreamEvents first.

Syntax

OnObjectStreamIn(object)

Parameters

  • object
    The object identifier which streamed in.

Example

Client

AddEvent("OnObjectStreamIn", function (object)
    AddPlayerChat("You streamed in the object ID "..object..".")
end)

See also