Throwing objects - 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: Throwing objects (
/showthread.php?tid=577605)
Throwing objects -
Baltimore - 12.06.2015
Hi !
How to make a script that can launch objects into the air ?
I think I'll have to use the plugin MapAndreas ...
Thanks !
Re: Throwing objects -
Abagail - 12.06.2015
Well launching them into the air is changing their Z which seems fairly simple to me. What are you planning on doing? Making a player launch them? Having a rocketship launch itself into the air?
If you just want to make it go upwards into the air, changing it's Z is the solution.
Re : Throwing objects -
Baltimore - 12.06.2015
I want to do something in this style :
https://www.youtube.com/watch?v=ol_Gta4DKkA
Re : Throwing objects -
Baltimore - 12.06.2015
Thanks for your help.
Re: Throwing objects -
Abagail - 12.06.2015
Well:
- First the script applies the throwing animation.
- The script moves the ball infront of the player, while increasing the Z, then decreasing it steadily.
There is an include very much like this namely "Throwing Knife":
https://sampforum.blast.hk/showthread.php?tid=539632
Take a look at that, it should help you out a bit with it.
Re: Throwing objects -
Vince - 12.06.2015
Making an object move along an arc is quite difficult since MoveObject only moves objects in a straight line. So to get the illusion of smoothness you'd have to calculate and then change the position roughly every 40 milliseconds (for that "silky smooth 24 fps"). I imagine this would be quite taxing on the CPU and it's not something you'd use on your everyday server.
Re: Throwing objects -
Baltimore - 16.06.2015
It is not possible to make a system like that, that it takes too much on the CPU of the machine?
https://www.youtube.com/watch?v=ol_Gta4DKkA