Object gravity/ariser - 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: Object gravity/ariser (
/showthread.php?tid=370576)
Object gravity/ariser -
Lordzy - 20.08.2012
Hello all,
Is there any function which is used to keep an object arise up all the time?
Example:
pawn Код:
CMD:riseobj(playerid,params[])
{
//Any fucntion there to keep on rising the object like gravity is set?
return 1;
}
If there,whats the function for stopping or going down.
Thank you in Advance.
Re: Object gravity/ariser -
Kar - 20.08.2012
MoveObject
Re: Object gravity/ariser -
Lordzy - 21.08.2012
But how could I keep it going on permanantly up.
MoveObject(objid,x,y,z+100000)//Will that make object move upwards for many time?
Re : Object gravity/ariser -
admantis - 21.08.2012
Move the object to an infinite float value:
pawn Код:
#define FLOAT_INFINITY (Float:0x7F800000)
new Float:objectx, Float:objecty, Float:objectz;
GetObjectPos( objectid, objectx, objecty, objectz );
MoveObject( objectid, objectx, objecty, FLOAT_INFINITY, 1.0 );
This will ensure it will move to infinite height values.
Re: Object gravity/ariser -
Lordzy - 21.08.2012
Thank you.
But to bring it down,should i add minus(-) in FLOAT_INFINITY?
Re : Object gravity/ariser -
admantis - 21.08.2012
Yes.
Re: Object gravity/ariser -
Lordzy - 21.08.2012
Thank you very much + have some rep.