ok, i know i’ve been making a lot of threads but this will probably be the last question i want to ask in a while.
so i’ve got this enemy. i want him so that if he hits a (invisible wall), he turns around and walks back.
so, this is the script i’ve got so far, but it doesn’t seem to work.
(this script is on the enemy)
onClipEvent (load){
_x-=random(3)+1;
}
onClipEvent (enterFrame){
if (this.hitTest(_root.wall)){
_rotation=180;
_x+=random(3)+4;
}
}
any suggestions?