ive post before about the game. kinda like pacman game. can anyone help me with the actionscript of the enemy? the enemy is only one and constantly chasing the user’s character through the maze.
onClipEvent(enterFrame){
coll = “”;
for(i =0; i<32;i++){
if (this.hitTest(“_parent.dinding” + i)) {
coll = “hitted”;
_x = oldx;
_y = oldy;
} else {
if(coll != “hitted”){
coll = “not hit”;
}
}
}
oldx = _x;
oldy =_y;
}
this is the script i used for the user’s character. the character’s movement is fine and i need help on the AI of the enemy. can anyone help ?
since i cant upload my fla due to the size, here is the fla link :
betatesting.fla