Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Npc Hp Bar Problems (https://forums.graalonline.com/forums/showthread.php?t=961)

WeirdmanI9 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.
------------------------------------------------------------------------
Specifications:
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.

MoonAngel 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;
timeout=0.05;
}
}
if (playerenters&&meter&&isweapon) timeout=0.05;
if (timeout&&meter) {
this.xloc=screenwidth-112;
this.mlength=(playerhearts/playerfullhearts)*68+1;
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;
timeout=0.05;
}


All times are GMT +2. The time now is 10:06 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.