Health System,

heya i made a health system, but i got 1 small question

how can u let the “moving_mc” die when hp = 0 ?

i made a dynamic box for the health,

in my frame i putted:

 health =  100; 

and in my monster :

 if (_root.moving_mc.hitTest(this)) {
        _root.health -= 2;

Within the hitTest, check to see if you have sufficient health.[AS] if (_root.moving_mc.hitTest(this)) {
_root.health>0 ? _root.health -= 2 : trace(“You died!”);
}[/AS]

thnx man,

is there any script that makes it go to a choosen Frame name? :slight_smile:

hero.gotoAndStop(/* framename or number here*/)

because gotoAndStop is overloaded you can put a number or you can put the frame name

thnx but bombsledder,

that doesnt work i allready tried that :frowning: thnx anyway :slight_smile:

if (_root.moving_mc.hitTest(this)) {
_root.health>0 ? _root.health -= 2 :hero.gotoAndStop(/* framename or number here*/)
}

you should maybe try on something you might complete :confused: