Smooth Rotation Help - 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: Smooth Rotation Help (
/showthread.php?tid=487140)
Smooth Rotation Help -
Birdkid1999 - 12.01.2014
Hello, I am trying to figure out how to use Smooth Rotation, my script currently uses MoveDynamicObject to move gates, gates are a dynamic system in game.. Should I switch it to MoveObject? Help is appriciated
Re: Smooth Rotation Help -
Ballu Miaa - 12.01.2014
Well the native is this. 5th parameter is speed. Just change the speed of its movement. Just lower it down to make it smoother.
pawn Код:
native MoveDynamicObject(objectid, Float: x, Float: y, Float: z, Float: speed, Float:rx = -1000.0, Float:ry = -1000.0, Float:rz = -1000.0);
Respuesta: Smooth Rotation Help -
Swedky - 12.01.2014
Quote:
Originally Posted by Birdkid1999
Hello, I am trying to figure out how to use Smooth Rotation, my script currently uses MoveDynamicObject to move gates, gates are a dynamic system in game.. Should I switch it to MoveObject? Help is appriciated
|
You cannot use 'MoveDynamicObject' in the object created with 'CreateObject'. If it wants to move an Object or does changes in him, it must do it with the functions with which it created them...
If it wants to rotate objects from an object created with '
CreateObject'
, use this:
pawn Код:
stock RotateObject(objectid, Float:rX, Float:rY, Float:rZ)
{
if(IsValidObject(objectid))
{
new Float:Pos[3];
GetObjectPos(objectid, Pos[0], Pos[1], Pos[2]);
CreateObject(objectid, Pos[0], Pos[1], Pos[2], rX, rY, rZ, 300.0);
}
}
Though the streamer makes it easier.
Sorry if I explained badly, I do not understand very much the English.
Regards.
Re: Smooth Rotation Help -
Birdkid1999 - 12.01.2014
I ended up getting this working! Basically, you have to set the gate / object to move up just a bit when it rotates... This can be done by simply increasing the z movement coord from 13.1 to 13.3. Then you just slow the speed down to something like 0.005.