Object gravity/ariser
#1

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.
Reply
#2

MoveObject
Reply
#3

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?
Reply
#4

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.
Reply
#5

Thank you.
But to bring it down,should i add minus(-) in FLOAT_INFINITY?
Reply
#6

Yes.
Reply
#7

Thank you very much + have some rep.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)