SA-MP Forums Archive
Falling object - 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: Falling object (/showthread.php?tid=593220)



Falling object - McDzuna97 - 03.11.2015

Hello, i'm working some system, and i was wondering how to drop something from vehicle, like a plane.. I mean you are flying with Andromada and you want to drop package(some object), how to drop it and how to remain it down on the ground, so the other players can use it?


Re: Falling object - ThePhenix - 03.11.2015

You can use ColAndreas plugin to detect the max Z position given a X, Y respectively or MapAndreas. Then, you can use MoveObject to move the object to the ground position.


Re: Falling object - McDzuna97 - 03.11.2015

Can you tell me little more details? I've never worked with this two plugins..


Re: Falling object - PrO.GameR - 03.11.2015

MoveObject is a function that simply moves an object from position A (the plane) to position B (ground)
You need to detect Position B's z ( x,y can be extracted from position A's x and y ) which is ground, ColAndreas provides that info ( the z )

got it or need more explanation ?