View Full Version : [FLASH 8][NOOB Q] Adding hp?
<Mike>
01-22-2008, 08:46 PM
Ok hello, I know i am a noob at flash 8, so strait up i have a little game im making for my little cusion, but i cant find the add hp code, i have remove hp, have a look
http://img209.imageshack.us/my.php?image=basicmovinghealthfo8.swf
arkhan
01-23-2008, 03:02 AM
just do the same thing and invert the signs
<Mike>
01-23-2008, 05:48 PM
Well i use this to take hp onClipEvent(enterFrame){
if(this.hitTest(_root.player)){
_root.playerhp -= random(2);
}
}
What is plus?, Anyway I need a code so you cant go over 100hp please :D
onClipEvent(enterFrame){
if(this.hitTest(_root.player)){
if (_root.playerhp > 0){
_root.playerhp -= random(2);
}
}
}
That's so you can't minus when you hit 0. Figure the rest out. If you can get it to subtract health, then you can get it to add if you use simple logic.
Malignus
01-23-2008, 08:33 PM
What is plus?
+
truimagz
01-23-2008, 10:46 PM
http://www.truimagz.com/share/healthBar.fla
That should help you.
vBulletin® v3.7.3, Copyright ©2000-2010, Jelsoft Enterprises Ltd.