Objects with CreateDynamicObject gone
#1

Hello,
I have a problem.
Objects which are with CreateDynamicObject are gone.
Objects which are with CreateObject are OK.
Any ideas?
What's the difference and why this problem is?
Reply
#2

I've also had a whole lot of problems with that stuff lately.

How are you saving the objects, or are they coded into the script?
Reply
#3

They are in the gamemode.
Reply
#4

Could you paste at least one of the CreateDynamicObject lines?

Also what function is it in?
Reply
#5

Код:
CreateDynamicObject(17084,4061.19555700,-9095.33691400,-10.16438900,0.00000000,0.00000000,-89.99998128); //object(6)
That's in OnGameModeInit
Reply
#6

pawn Код:
CreateDynamicObject(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 200.0, Float:drawdistance = 0.0);
You've not followed the correct arguments.

pawn Код:
CreateDynamicObject(modelid, X, Y, Z, RX, RY, RZ, -1, -1, -1, 200.0, 0.0);
That is one that I have in my gamemode. Try adapting to it, if you have any more issues/questions feel free to ask.
Reply
#7

Any other ideas?
Reply
#8

Quote:
Originally Posted by bobsona
Посмотреть сообщение
Any other ideas?
Yes

1) make sure your script that contains CreateDynamicObject is using YSI include

pawn Код:
#include <YSI\y_ini>

2) Your Code have unneeded more numbers , i removed it , now try to use this code and it shall work :

pawn Код:
CreateDynamicObject(17084,4061.1955570,-9095.3369140,-10.1643890,0.0000000,0.0000000,-89.9999813); //object(6)
The changes :
pawn Код:
CreateDynamicObject(17084,4061.19555700,-9095.33691400,-10.16438900,0.00000000,0.00000000,-89.99998128); // YOUR CODE
CreateDynamicObject(17084,4061.1955570,-9095.3369140,-10.1643890,0.0000000,0.0000000,-89.9999813); //THE NEW CODE
Reply
#9

1. Y_Ini is included.
2. I do not think the problem is in the numbers, because to some time ago everything was working and suddenly began to not display the objects.
Reply
#10

This happened to me where i forgot i had a stock "LoadObjects" under OnGamemodeInit that loaded Dynamic objects, and then i placed some other CreateDynamicObject lines under OnGamemodeInit, instead of the stock.

It also might be because you're using too many normal objects with too many Dynamic ones, and are therefore hitting the limit.
You can have 1000 objects with CreateObject.
But CreateDynamicObject doesn't just remove the limit, it works by switching the objects that players can see, and thereby having over 1000 objects, while players can only see 500 or something.

So therefore if you have alot of normal objects, it will decrease the dynamic objects that can be switched.
Etc. no normal objects, and a player is close enough to see 200 new objects in an area. (A bit unrealistic, but lets just say that)
And then there's 1000 objects with CreateDynamicObject.

1000 Dynamic Objects that are invisible. (Doesn't matter to the limit)
200 Dynamic Objects that can be seen by the player. (Counts towards the limit)


But if you have 800 normal objects, and a player in an area with 300 dynamic objects, it wont work.

800 Normal Objects that are always visible. (Counts towards the limit)
300 Dynamic Objects that can be seen by the player. (Counts towards the limit)
= 1100 objects, while the limit is 1000, thereby making less Dynamic Objects so they cannot be seen.


Basically, using many normal objects while using Dynamic objects can be a mess.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)