im having some minor troubles with my flash game im currently working on, I was wondering if “ANYONE” could help me out a little bit with the life bar issue I’ve been dealing with… basicly I have 4 characters you can choose from, but they all are located in 1 main MC, they also share the same life bar but im having trouble in making it so surtant characters you choose have stronger life than others… do you think you could help me out with this if i send you the flash.
this is the script for the main MC that holds all the characters you can choose from in it
[SIZE=2]Code:[/SIZE]
onClipEvent (enterFrame) {
if (_root.character == 1) {
this.gotoAndStop(1);
if (_root.character == 1) {
_root.anthony_hp = 20;
anthony_hp._width = 100;
}
} else if (_root.character == 2) {
this.gotoAndStop(2);
if (_root.character == 2) {
_root.anthony_hp = 100;
anthony_hp._width = 100;
}
} else if (_root.character == 3) {
this.gotoAndStop(3);
if (_root.character == 3) {
_root.anthony_hp = 100;
anthony_hp._width = 100;
}
} else if (_root.character == 4) {
this.gotoAndStop(4);
if (_root.character == 4) {
_root.anthony_hp = 100;
anthony_hp._width = 100;
}
}
}
this is the script for the life bar
[SIZE=2]Code:[/SIZE]
onClipEvent (load) {
_root.anthony_hp = 20;
}
onClipEvent (enterFrame) {
if (_root.anthony_hp>=20) {
_xscale = (_root.anthony_hp/_root.anthony_maxhp*10 0);
}
}
I’m so confused… =/ I’ve never done anything like this