pimuni
04-20-2005, 01:16 AM
hello guys. i am a beginner in actionscript. and i am making my own little game. but I need help with something. i am using a dynamic text for the spaceship hp, and i want the game to perform an action when that dynamic text reaches 0. the Var name of my dynamitc text is "hp". what would go with the if statement to make it work the way i want it to? this is what i have, but it doesnt work for me
onClipEvent (enterFrame) {
if (hp == 0) {
_root.player.Play();
}
}
the spaceship movieclip has its first frame on stop. the rest of the frames r the explosion. i want it to explode when the hp of the ship reaches 0. (it has 200 hp). please help me out
onClipEvent (enterFrame) {
if (hp == 0) {
_root.player.Play();
}
}
the spaceship movieclip has its first frame on stop. the rest of the frames r the explosion. i want it to explode when the hp of the ship reaches 0. (it has 200 hp). please help me out