Click here to join us on IRC (#charas on irc.freenode.net)!
Written by Dragonblaze some time back: Ok I dont know what you mean by start, but i can help you with the hp bar.Ok, how many pictures do you have for the bar? Well lets say you have 20 (if you don't, just replace 20 with the number you have).First off, set a variable to the current hp, lets call it [hp percent]. Multiply it by 19 (or one less than the number of pictures you have 20-1 = 19), then divide it by the hero's total hp. This will make [hp percent] equal to the percent of the heros life life. Now make 20 conditional branches. One for if [hp percent = 0] (show the empty bar), one for if its one (show the almost empty bar, and keep going up from there. In the end, it should look like this.set [hp percent] = current hpmultiply [hp percent] by 19divide [hp percent] by total hpif [hp percent] less than or equal to 0- show picture, empty barif [hp percent] = 1- show picture, almost empty bar...if [hp percent] = 19-show full barThe reason you have to do it one less than the number of pictures you have is because you need to count 0 as a number. so even though you're only going up to 19, you're counting 0 too, and 0 + 1-19 = 20 numbers.