chasing another car?
allc1865
Member, PRO Posts: 777
Hello...In my game, I have the player chase a car. I have looked on a way to do this, but I couldn't find anything. I want to make the 'enemy' run and stay away from me while the player goes to catch it. Is there any way to do this?
Thanks.
Thanks.
Answers
Hope that explains it.
Thanks!
The criminal is headed towards the exit if the cop doesn't catch him in enough time.
Cop add a
Constrain attribute self.position.x to current scene-layers-criminal-self.position.x
Constrain attribute self.position.y to current scene-layers-criminal-self.position.y-40 (play around with that 40 number) this offsets the cop from your criminal.
Timer
Every 1 sec change attribute self.position.y to self.position.y+1
this will make him close in on the criminal every sec. You can mess around with the numbers but should be able to work.
Criminal = car 1
Car 1 should already have your movement behaviors in it and add what I said above to car 2 and he will follow with a gap between car 2 and car 1
But if you have to move quickly then yes it might catch some traffic. Good point.