HeavyMetal Posted March 27, 2013 Share Posted March 27, 2013 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
codeluaeveryday Posted March 27, 2013 Share Posted March 27, 2013 Can't you just use (client): setPedAimTarget() Link to comment
HeavyMetal Posted March 27, 2013 Author Share Posted March 27, 2013 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
HeavyMetal Posted March 27, 2013 Author Share Posted March 27, 2013 and i just found how to do it, lol ,problem solved Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now