Topic: Game Programming / Please help me with maze game! (AS2)
Originally posted by boxmein:The easiest way to make a maze NOT be able to left-click cheat is to make a small dot then make it a MovieClip, reg point center and enter THIS code :
x = mousex
_y = _mousey
Mouse.hide();
onClipEvent(enterFrame) {
if(root.wall.hitTest(x, _y, true)) {
_root.gotoAndStop(1)
}
}
The first 2 lines will make the clip follow the mouse
The 3rd line makes the mouse hidden
The last part does : if you touch the wall instanced movieclip by its reg. point, the main frame goes to 1.
Sorry for db but that is _x on the first line.