|
-
[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
-
Senior Member
where is your collision check?
Anyway, the simplest way would be to draw the entire wall inside a movieclip, then hitTest it with the player movieclip. The concept is the same as other mouse avoider games.
But if this is tile based, and you are going for a efficient design, you can always check the player's x,y to determine whther he is colliding with a wall cell!
If you like me, add me to your friends list  .
PS: looking for spriters and graphics artists for a RPG and an Arcade fighting project. If you can help out, please pm me!
My Arcade My Blog
Add me on twitter: 
-
srry bluemagica, but im more of a beginner so if you can maybe help by telling me what to add in my actionscript.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|