SA-MP Forums Archive
Help with createobject - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help with createobject (/showthread.php?tid=555684)



Help with createobject - puki7 - 08.01.2015

Im mapping in scm and that gives me createobject codes but if i put that in my script my createdynamicobject disapears so when i convert createobject to createdynamicobject my view distance is very close so the whole map doest load at onece than in parts can i change that so i could have createdynamicobject instead createobject and that my map loads at onece.
Please help, thanks.


Re: Help with createobject - HeLiOn_PrImE - 08.01.2015

Your map loads all at once if you use CreateObject.
CreateDynamicObject is for streaming (object load as you get close to them).

Do you understand the parameters of a streamed object? Streaming Distance and Drawing Distance can be set. You can basically set both of them to 3000 and have the hole map loaded when you approach less than 3 km.

CreateObject becomes ineffective for complex maps, because a server cannot hold more than 1000 objects at once (the client will crash).

I'll point out a reference to my Blake Island (the link is in my signature). If you download the script you should see that I have defined those distances as constants at the beginning. Instead of putting the values to each object, you can place those constants to each object. It makes testing a lot easier, since you will only have to set each of them once.
I'll monitor this topic. Feel free to ask any questions


Re: Help with createobject - CoaPsyFactor - 08.01.2015

or you can use include with x,y,z dimensions of object, get dimension calculate radius, for example you won't load trash can in radius of 20.0, you will do it on 10.0, but also you need building to be loaded at 150-200 as it should be seen from distance


Re: Help with createobject - HeLiOn_PrImE - 08.01.2015

I think there is an include which calculates the streaming/drawing distances depending on the object size.


Re: Help with createobject - puki7 - 09.01.2015

When I do it like you CreateDynamicObject(19443, 1485.72498, -700.24408, 94.29070, 0.00000, 0.00000, 84.16000, -1, -1, -1,350.0,350.0);
like that I get a warning and objects doesnt load at all.


Re: Help with createobject - HeLiOn_PrImE - 09.01.2015

you are using an older streamer version. Update to the latest version (plugin and include) and it should work.
Also, make sure your streamer actually works. Pay attention to the server console and see if all plugins load correctly.


Re: Help with createobject - puki7 - 09.01.2015

Ok, thanks, you helped me very much.