Chasing logic problem.
![galious](http://forums.gamesalad.com/applications/dashboard/design/images/defaulticon.png)
Hi all. I am making a logic for chasing. What I have doing is that enemy character chase the player character. Here is my logic.
Player side-----------------
game.PlayerX = self.Position.X
game.PlayerY = self.Position.Y
Enemy side---------------
Accelerate : direction: game.PlayerX Relative to actor
Accelerate : direction: game.PlayerY Relative to actor
The player character is controlable up, down, left and right with accelerate behavior. The problem is the enemy character move freely, not chase the player character.
Player side-----------------
game.PlayerX = self.Position.X
game.PlayerY = self.Position.Y
Enemy side---------------
Accelerate : direction: game.PlayerX Relative to actor
Accelerate : direction: game.PlayerY Relative to actor
The player character is controlable up, down, left and right with accelerate behavior. The problem is the enemy character move freely, not chase the player character.
Answers
Hallo @galious
If your rules:
Player side-----------------
game.PlayerX = self.Position.X
game.PlayerY = self.Position.Y
are change behaviours, make them constrain behaviours; see if that does the trick.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps