View Full Version : Npc Hp Bar Problems

04-04-2001, 10:25 AM
I made an HP Bar that replaces the hearts, but I can't figure out how to make it shorter when hit.
Suppose I get hit, and each portion of the bar is worth a half-heart. Like this is the bar. ---------- for 10 full hearts. If I lose a half-heart it'll go to --------- and a whole-heart it'll be --------. How do I do this, and make the portion of the bar get smaller when I increase my full-heart capacity? If you reply to this and it works, you get free 50 gralats on Graal 2001.

04-04-2001, 11:08 AM
here ya go, Warren is really a great npc maker. Although he decided to quit graal, im learning all of his scripts so that i can "follow in his foot steps" lol, well.. im starting to be pretty good with special effects ;-D

//NPC made by Warren
if (playertouchsme) toweapons HP meter toggle;
if (weaponfired) {
if (meter) {
hideimg -3;
hideimg -4;
unset meter;
else {
set meter;
if (playerenters&&meter&&isweapon) timeout=0.05;
if (timeout&&meter) {
showimg -4,insidebar.gif,10+this.xloc,129;
changeimgpart -4,0,0,this.mlength,22;
showimg -3,outsidebar.gif,this.xloc,100;
changeimgvis -4,4;
changeimgvis -3,4;