ricer
April 1, 2006, 8:47am
1
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]
ricer
April 1, 2006, 12:05pm
3
thnx man,
is there any script that makes it go to a choosen Frame name?
hero.gotoAndStop(/* framename or number here*/)
because gotoAndStop is overloaded you can put a number or you can put the frame name
ricer
April 1, 2006, 2:59pm
5
thnx but bombsledder,
that doesnt work i allready tried that thnx anyway
Joppe
April 1, 2006, 4:01pm
6
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