Search tutorials
first, make the main dude, name him "man"
now ull need so things to go around, make some guy that go up and down, name him "enemy"
now make another movie clip, make it a block, and name it "step"
go to the next frame and insert a blank keyframe. make a textbox and make it say somthing like " u lost bad luck". make a button, name it "restart" and place that underneath the textbox. click on the button, go to the actionscript window and type this:
on(release)
{ gotoAndPlay(1) }
you can probally guess that when the button is released, go to and play frame 1, therefore restarting the game.
go back to frame 1, and start making your maze, but add this code first then copy this mc so u dont have to type it again and again:
onClipEvent (load) {
movespeed = 10;
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.RIGHT)) {
_x-= movespeed;
}
if (Key.isDown(Key.LEFT)) {
_x+= movespeed;
}
if (Key.isDown(Key.UP)) {
_y+= movespeed;
}
if (Key.isDown(Key.DOWN)) {
_y-= movespeed;
}
}
onClipEvent (enterFrame) {
if (_parent.man.hitTest (this)) {
_parent.gotoAndStop(2);
}
}
now you got your walls and got ur losing window, make another mc, this is gona be ur end-of-the-lv thingy. name this "end" nd put it at the end of ur maze. now add the code above but add this aswell:
onClipEvent (enterFrame) {
if (_parent.man.hitTest (this)) {
_parent.gotoAndStop(3);
}
}
now go and make a blank keyframe at frame 3. make a message saying you completed this lv. make another button, place this under ur message, and this code:
on(release)
{ gotoAndPlay(4) }
copy frame 1 and paste it into frame 4, move the blocks around and you have a perfect maze game. but change the code of the block to this:
onClipEvent (enterFrame) {
if (_parent.man.hitTest (this)) {
_parent.gotoAndStop(5);
}
}
copy frame 3 and paste to frame 5, but change the button code to:
on(release)
{ gotoAndPlay(4) }
» Level Basic |
Added: 2005-12-05 Rating: 2.5 Votes: 28 |
» Author |
really basic tutorials and basic thigns to make |
» Download |
Download the files used in this tutorial. |
Download (0 kb) |
» Forums |
More help? Search our boards for quick answers! |