Jump to content

Follow Ped


TiTawN

Recommended Posts

You can make the ped perform actions using setPedControlState, with accelerate, vehicle_left and vehicle_right being the most important controls you would want to use for driving. You also need to retrieve the relative placement between ped's and player's cars, using functions such as getElementPosition and getElementRotation and some math. All these things need to be done repeatedly so that the control states would be updated as the elements move. If you also want to make the ped follow the roads (instead of going straight towards the player), then it gets more complicated because the script has to do pathfinding.

Edited by Reyomin
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...