[HELP] Maze game using arrow key
ok, so i have made my character and my walls and some other stuff.
but the thing i need help with is my walls. i can get my walls to work.
what i need them to do is if my character touches the wall, he/she dies causing the game to go to the death frame for each different level. oh and may instance for the guy is "dude"
here is the code i have for my guy:
Code:
onClipEvent (load) {
moveSpeed = 7;
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.RIGHT)) {
this._x += moveSpeed;
} else if (Key.isDown(Key.UP)) {
this._y -= moveSpeed;
} else if (Key.isDown(Key.DOWN)) {
this._y += moveSpeed;
} else if (Key.isDown(Key.LEFT)) {
this._x -= moveSpeed;
}
}
I need help with this as soon as possible.
thanks.
KGGAMELOT