Cops
by Quentin Headen · in Technical Issues · 06/27/2006 (7:12 pm) · 5 replies
I wanted to make a racing game with the police in it. I want to know how can make the cop car chase you if you are going to fast or if you pass it. Please give me this info.
Thank you.
Thank you.
About the author
Just your average programmer who tries to finish the projects he starts. :) I am currently focused on creating games with Torque engines. My website is http://phaseshiftsoftware.com
#2
06/29/2006 (9:42 am)
Well, how can you make a AI bot follow the player?
#3
If you dont know where the aiGaurd resource is, just use the search box and type aiGaurd or aiPartol.
Hope Im pointing you in the right direction.
-Surge
06/29/2006 (10:46 am)
Modify the aiGuard resource.If you dont know where the aiGaurd resource is, just use the search box and type aiGaurd or aiPartol.
Hope Im pointing you in the right direction.
-Surge
#4
YourBotsName.setMoveDestination(YourPlayersName.getPostion());
..........getTransform also works but it always made my guy spaze out.
O yea I'm working on a C++ function that should make chasing the player much more easy.
I'll post when I'm done. (If I'm done)
06/30/2006 (7:17 am)
Making a bot go to the player is as simple as this:YourBotsName.setMoveDestination(YourPlayersName.getPostion());
..........getTransform also works but it always made my guy spaze out.
O yea I'm working on a C++ function that should make chasing the player much more easy.
I'll post when I'm done. (If I'm done)
#5
06/30/2006 (4:16 pm)
I want to thank you guys for all of the help you give me.
Torque Owner John Doppler Schiff
This is a fairly deep topic, not just a 3- or 4-line code example. For starters, I'd suggest checking out some online resources about pathfinding and the A* algorithm.
Advanced 3D Game Programming All In One has several excellent chapters devoted to AI, and I think it's exactly the resource you're looking for.
Depending on your experience and ability, you might want to check out the first volume in the series beforehand. Both are great resources to cut your coding teeth on.
Good luck!
-- JohnDopp