Dynamic object bugg
#1

Hi,

I move dynamic object and when i get him pos GetDynamicObjectPos (when he is moving) i get position when he start a move. Why it'is? with createobject, even if i moveobject i always get position of moving object.
Reply
#2

Make sure that you're using CreateDynamicObject if you're using GetDynamicObjectPos. You said that you're using a dynamic object, but I can recreate this without issues.
Reply
#3

Yes am using everywhere dynamic object.
Reply
#4

Am doing that. I create dynamic object and then in OnPlayerUpdate i MoveDynamicObject to your position with 20.0 speed. And after that i want to GetDynamicObjectPos, but position is that from where object start to move and it have no change even dynamic object is targeting me.

Код:
OnPlayerUpdate (..)
{
MoveDynamicObject(...);
new Float:X,Float:Y,Float:Z;
GetDynamicObjectPos( ...X,Y,Z );
SetPlayerMapIcon( playerid, 69, X,Y,Z, 0, 0xFFFFFFAA, MAPICON_GLOBAL );
}
And i make an icon in minimap:

SetPlayerMapIcon( playerid, 69, X,Y,Z, 0, 0xFFFFFFAA, MAPICON_GLOBAL );
How i said icon in the same place where object start moved. With CreateObject, MoveObject and so on.. Then icon is changing place where is object.. I tried to Streamer_Update(playerid); when i MoveDynamicObject but this not help.
Reply
#5

You could save the object's position before moving it and add/subtract the difference between the new and the old position with the help of a timer.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)