HELP - dude, wheres my hitTest?
Hi all,
I hadthis problem a while back, so Im putting the question to you experts. I need my small npc dudes to walk the opposite way whenever they hit a wall (North, South, East or West). I've ued hitTest on the guy, and he moves up the screen towards the test wall where he hits it and doesn't move in the opposite direction (despite my best scripting attempts - Below).
onClipEvent (load) {
dudeSpeed=5;
this.gotoAndStop(1);
}
onClipEvent (enterFrame) {
this._y-=dudeSpeed;
if (this.hitTest( _root.wall ) ){
this._y=
this._y+=dudeSpeed;
}
}
It compiles correctly, runs correctly, but when it reaches the "Wall" MC, it just stops in its tracks. Doesn't move down the y+ axis as requested.
Any suggestions? Much appreciated :)
Kris