Remember me
You are here: HomeForumCyberix3D ForumGeneral DiscussionAdd force to a charracter?
Welcome, Guest
Username: Password: Remember me

TOPIC: Police chace?

Police chace? 3 years 4 months ago #2501

  • TheSteveKid13-
  • TheSteveKid13-'s Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 21
  • Thank you received: 1
Hello,

I am currently making a game and I want to know how can I do a police car that chases you or at least a car I want the car to follow you wherever you, does not matter if you go left or right the car will always follow you.

Can I do this?

Thanks,
Steve kid
The administrator has disabled public write access.

that is a good idea 3 years 4 months ago #2502

  • Steven-Lemley
  • Steven-Lemley's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 35
  • Thank you received: 3
yeah I'm wondering that too
The administrator has disabled public write access.

that is a good idea 3 years 4 months ago #2505

  • cyberix3d
  • cyberix3d's Avatar
  • OFFLINE
  • Administrator
  • Posts: 661
  • Thank you received: 628
Hello,
Here is a police car example.
www.gamemaker3d.com/player?pid=01620776
You can take that example, remove the police car auto keys, and spawn a new car.
In order for the police car to chase the car, you need to build some algorithm to do it inside the police car.
Here is a pseudo-code:
<Vehicle name="police_car">
<Loop>
1. Check the difference between the police car position and the car position
2. Drive to the car position by changing the car steering and engine force according to the car position
</Loop>
</Vehicle>
Regards,
Cyberix3D
Last Edit: 3 years 4 months ago by cyberix3d.
The administrator has disabled public write access.

that is a good idea 3 years 4 months ago #2506

  • TheSteveKid13-
  • TheSteveKid13-'s Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 21
  • Thank you received: 1
Hello,

Thanks but I didn't really understand that...... will you be able to give me an example with the cyberix 3d code please?

Thanks,

Steve Kid
The administrator has disabled public write access.
Time to create page: 0.091 seconds