Hello, I been making this game I seen a tutorial on it but I am not going to copy it but It had something I wanted so I copied just 1 thing it’s been bugging me though I can’t seem to change frame when the HP is 0 I need help anyone?
This is my HP Bar
onClipEvent (enterFrame) {
this._xscale = _root.Enemy_1_Hp;
if (_root.Enemy_1_Hp<=0) {
_root.Enemy_1_Hp = 0 ;
}
}
This is my Frame script to make sure that the HP is set to 100.
Enemy_1_Hp = 100;
I got it nevermind.
I just took the script
onClipEvent (enterFrame) {
this._xscale = _root.Enemy_1_Hp;
if (_root.Enemy_1_Hp<=0) {
_root.Enemy_1_Hp = 0 ;
}
}
and edited to this
onClipEvent (enterFrame) {
this._xscale = _root.Enemy_1_Hp;
if (_root.Enemy_1_Hp<=0) {
_root.Enemy_1_Hp = 0 ;
_root.gotoAndStop(5) // This is where I got confused but I manage to get it =]
}
}