Jump to content

Police AI Question


DjSt3rios

Recommended Posts

Posted

Hello! I wanted to ask some questions... First of all I was thinking of making a code to make cops chase you... but I still have some questions before I start working on it... I was wondering if its possible to make the cops go from the same way the suspect went... or if its possible to record the keys that the player presses, and then make the cop do the same thing.. first of all the cop would be created behind the player, and it will start doing the same things, something like that... Do you think it is possible to make it?

Posted

Well, it's not impossible, but not easy at all, there is resources for recording in the community, but not lag free.

Posted

Hmmm, I thought of something else.. I could create a police car behind the player with a speed, and make the police go straight head to the car.. the thing is that to rotate we could use setElementRotation, but I would prefer something more realistic...

Posted
but I would prefer something more realistic...

You and the rest of the community ^^

What you're asking here is pretty hard

Posted

You should check the player's car rotation, and use setElementRotation with a delay on the police car. So when the player turns, after 1.2, seconds the police car rotates to. But first you have to calculate the car's speed in order to successfully rotate the police car.

Posted

Hmmm, I could make the car spawn behind the player with a certain speed, and then do it with the way you said.... sounds interesting. I will give it a try when I find some time.

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...