Enemy Health AS@

4 posts

Flag Post

Hi there everyone !

I have problem with enemy health. those are the scripts

Enemy health part

onClipEvent(enterFrame)) { if (this.hitTest(_root.bullet)) { _root.live -= 1; if (_root.live = 0) {

this.removeMovieClip();
}

} }


Variable on first frame of enemy

var live = 3 ;

Anyone have any ideas ?

 
Flag Post

(_root.live = 0)

should probably be

(_root.live == 0)

 
Flag Post

^ Why do so many people fail programming 101 lately?

 
Flag Post

I guess they could use a more beginner friendly IDE.