Posts: 64
Threads: 20
Joined: Apr 2014
Reputation:
0
Hi,
Whats the difference between CreateDyanmicObject and CreateObject?
because when im using CreateDynamicObject the streamer is tooo slow to stream. Should i change it to CreateObject?
Posts: 1,661
Threads: 47
Joined: May 2013
Reputation:
0
I personally only use CreateDynamicObject for scenery objects and keep my main objects in CreateObject. You shouldn't really need to use a streamer unless you've got more than a thousand objects.
Posts: 2,041
Threads: 97
Joined: Jun 2013
Both functions will have a limit of objects that will be 500, whereas other 500 are stored in the memory. 'CreateDynamicObject' show the objects that are seen by some player, and this way to reduce the limit and to lower the lag.
About your problem, maybe you create objects repeatedly.
Posts: 64
Threads: 20
Joined: Apr 2014
Reputation:
0
Then why the objects stream too slow?
Where are the problem caming from ?
Posts: 727
Threads: 79
Joined: Mar 2012
Reputation:
0
It's simple, createdynamicobject doesn't create an object, it saves the data you put into that function in some variable, then when a player enter the range of the position you have stored into those variables, it will create the object using createplayerobject, when the player is out of the range of that object, it will destroy it again.
This why you can add like 50k objects as long as they are not all close to each other.
But for example when you teleport a player to one of those objects, it can happen that the timer which checks if the player is in range of the object is too late, and the player falls through the object.
There are different ways to fix this, here are some;
- you can use createobject only for the objects where players spawn on.
- you can freeze the player for like 3 seconds so the objects will be loaded before the player can move
- in some cases you can use the function Streamer_UpdateEx that is included with the streamer to load the objects to a player when he is not yet at the position.