Jump to content

making a ped shoot on a moving target


HeavyMetal

Recommended Posts

hello, im working on some AI for peds, and im with a problem that is: how to make a ped aim and shoot correctly on a moving player/car?

i im trying to do getElementVelocity + its aim in a lot of ways, but i cant find a relation or a math solution on how to use that, because i dont know how much time each of the functions takes, so i cant calculate how many time passed on each one of them between aim and shoot or estimate where the element really is and what all this have to do with the distance, im posting this because im sure that a lot of people did ped shooting before me and found a solution for that.

anyone know how? any ideas?

thanks

Link to comment

im using that, but my problem is: when i get the target's coordinates and put it on the aim command and them trigger the fire command, the target is not there anymore when it fires,because it is moving, i want the ped to aim to where the target is going to pass and wait to shoot. so it is not going to miss, but i dont know how can i do that

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...