Throwing objects
#1

Hi !

How to make a script that can launch objects into the air ?
I think I'll have to use the plugin MapAndreas ...

Thanks !
Reply
#2

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

I want to do something in this style :

https://www.youtube.com/watch?v=ol_Gta4DKkA
Reply
#4

Thanks for your help.
Reply
#5

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

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

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)