Is it possible to.. - 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: Is it possible to.. (
/showthread.php?tid=468159)
Is it possible to.. -
TonyII - 06.10.2013
Is there a way to launch rockets similar to the rocket launcher and the rhino, or is there a way to detect the distance to the walls/objects in my way and do like CreateExplosion?
Re: Is it possible to.. -
Pottus - 06.10.2013
Partially you can use Map Andreas to detect potential collisions ahead of an object which is not perfect.
Re: Is it possible to.. -
TonyII - 06.10.2013
Alright, thanks.
Re: Is it possible to.. -
Pottus - 06.10.2013
What I would do is figure out the range of your rocket say for instance it is 100 meters you will need to take note of the origin Z-Height then keep checking 1.0 meter ahead of that position. If you find a Z-Height greater than your origin height there is a collision. Now that is for a rocket that moves perfectly straight along the XY axis without change in Z-Height so you'll need to adjust your calculations for this.
Re: Is it possible to.. -
TonyII - 07.10.2013
Oh wow, it's just that I am pretty bad in math and what I wanted to try was just to make this
FS of mine able to shoot canons ->
https://sampforum.blast.hk/showthread.php?tid=468166