SA-MP Forums Archive
Mapping - Objects re-position themselves? SAMP Editor - 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: Mapping - Objects re-position themselves? SAMP Editor (/showthread.php?tid=426716)



Mapping - Objects re-position themselves? SAMP Editor - EiresJason - 29.03.2013

Hi, I'm adding some barriers around the mall in Market. Im using SA-MP Map Editor but when i actually click on "Show Code", and then paste the code into my OnGameModeInit(), the objects aren't positioned where i placed them.

They are levitated and in the wrong X/Y positions. In the first and second SS you see how they are on the ground(and in place), in the third SS you see that they are leviated and out of place. Is there a reason why this is happening?

Thanks to anyone who can help.

SS One: http://imgur.com/2Fq0vRj,ozreAh4
SS Two: http://i.imgur.com/ozreAh4.jpg
SS Three: http://i.imgur.com/ok0r6zZ.jpg (Numbers 1 and 2 in the SS show the problem)

Code
Код:
CreateObject(997, 1152.40674, -1415.53198, 12.93140,   0.00000, 0.00000, 90.00000);
CreateObject(997, 1106.59827, -1415.51245, 12.93140,   0.00000, 0.00000, 90.00000);
CreateObject(997, 1061.84595, -1494.60156, 13.08250,   0.00000, 0.00000, 76.62500);
CreateObject(997, 1060.59155, -1499.71155, 13.08250,   0.00000, 0.00000, 76.13100);
CreateObject(997, 1125.64587, -1561.49133, 13.16610,   0.00000, 0.00000, 0.00000);
CreateObject(997, 1131.07996, -1561.49133, 13.16610,   0.00000, 0.00000, 0.00000);
CreateObject(997, 1185.70032, -1483.34216, 13.06330,   0.00000, 0.00000, 90.00000);
CreateObject(997, 1185.70032, -1495.79016, 13.06330,   0.00000, 0.00000, 90.00000);
CreateObject(997, 1185.70032, -1489.48425, 13.06330,   0.00000, 0.00000, 90.00000);
CreateObject(994, 1109.43896, -1412.36621, 13.06690,   0.00000, 0.00000, 0.00000);
CreateObject(994, 1117.30396, -1412.34961, 13.06690,   0.00000, 0.00000, 0.00000);
CreateObject(994, 1125.19189, -1412.34961, 13.06690,   0.00000, 0.00000, 0.00000);
CreateObject(994, 1133.07996, -1412.34961, 13.06690,   0.00000, 0.00000, 0.00000);
CreateObject(994, 1140.94788, -1412.34961, 13.06690,   0.00000, 0.00000, 0.00000);
CreateObject(994, 1148.85596, -1412.34961, 13.06690,   0.00000, 0.00000, 0.00000);



Re: Mapping - Objects re-position themselves? SAMP Editor - EiresJason - 30.03.2013

Anyone got any clue why this happens please?


Re: Mapping - Objects re-position themselves? SAMP Editor - Pawnie - 30.03.2013

Oh happened to me. Use Dynamic objects, aka streamer objects.

CreateDynamicObject

https://sampforum.blast.hk/showthread.php?tid=102865


Re: Mapping - Objects re-position themselves? SAMP Editor - Pottus - 30.03.2013

I think I know why, your probably using something like this.....

Код:
if(response == EDIT_RESPONSE_UPDATE)
{
    SaveObjectPosition();
}
But what your doing is cancelling your edit instead of clicking the save button which means your objects will be at their last moved position before the last move it is imperative that you click the save button on each exit then save that position or this will happen.

Код:
else if(response == EDIT_RESPONSE_FINAL)
{
     SaveObjectPosition()
}
Please not SaveObjectPosition() is just a hypothetical function for demonstrating the problem this also has absolutely nothing to do with not using dynamic objects don't listen to that last poster.


Re: Mapping - Objects re-position themselves? SAMP Editor - idontcareRO - 22.11.2015

Pottus, i have the same problem and i don't have the SaveObjectPosition() in my script.


Re: Mapping - Objects re-position themselves? SAMP Editor - TwinkiDaBoss - 22.11.2015

Its an object problem. Ive created it the static way aka created the map inside MapEditor and pasted the code into the pawn, the objects would always rotate differently from what Ive set.