PDA

View Full Version : STATUS BARS x.X


MoonAngel
06-23-2001, 11:57 AM
ok, i made a status bar.. the thing is that when i enter a new level, it messes up.. = \ i WILL NOT post the script since all the newbies and midbies that need it will steal it, so any good scripter willing to help, ill PM the script. thank you

06-23-2001, 12:03 PM
Hmm... I will make you a status bar for life, mp, and ap. it will take be about 10-15 mins.

MoonAngel
06-23-2001, 12:06 PM
i already made them, i just need a good scripter that will fix it so that it works on all levels =\

06-23-2001, 12:10 PM
// NPC made by Ice Pick
timereverywhere;
timeout=.05;
if (playerenters) {
toweapons weapon name;
}
if (timeout) {
if (isweapon) {
showstats 1+2+4+8+16+256+512+1024;
this.pos = {screenwidth-180,30};
this.hpdisplay = ((playerhearts/playerfullhearts)*100);
this.mpdisplay = ((playermp/100)*100);
this.apdisplay = ((playerap/100)*100);
if (good) {
showimg 1,statsmenuname.gif,this.pos[0],this.pos[1];
}
else if (evil) {
showimg 1,statsmenuname.gif,this.pos[0],this.pos[1];
}
else {
showimg 1,statsmenuname.gif,this.pos[0],this.pos[1];
}
changeimgvis 1, 4;
if (this.hpdisplay>0) {
showimg 3,mpbarname.gif,this.pos[0]+15,this.pos[1]+33;
changeimgpart 3,0,0,this.hpdisplay,6;
changeimgvis 3,4;
}
else {
hideimg 3;
}
if (this.apdisplay>0) {
showimg 4,mpbarname.gif,this.pos[0]+15,this.pos[1]+50;
changeimgpart 4,0,0,this.apdisplay,6;
changeimgvis 4,4;
}
else {
hideimg 4;
}
if (this.mpdisplay>0) {
showimg 5,mpbarname.gif,this.pos[0]+17,this.pos[1]+66;
changeimgpart 5,0,0,this.mpdisplay,6;
changeimgvis 5,4;
}
else {
hideimg 5;
}
}
}
if (playerdies) {playerap=playerap;playermp=playermp;}

try that... I dunno if it works right though...

CrazedMerlin
06-23-2001, 12:43 PM
hello icepick, be really cool and make me a stats meeter, bai!

MoonAngel
06-23-2001, 12:49 PM
it's not for a normal bar, it's like.. a Stamina bar and it goes down with a timeout but messes up when you go in another level > _ < i alerady have every other type of status bar =\

grim_squeaker_x
06-23-2001, 06:58 PM
Well only advice I can think of is this:
put in "isweapon" flags in all stuff which it only needs to if it is a weapon, put a !isweapon flag in any things which it needs to do if it isn't a weapon, use strings for storing how many stamina the player has, and make sure that it doesn't reset the stamina everytime the player entesr another level.

Falcor
06-23-2001, 10:22 PM
Dont use timeout to count down. Timeout is really unreliable other than looping really fast =\
Id suggest a Variable

if (isweapon) {
if (playerenters||timeout) {
timeout = 0.05;
if (this.time<=0) {
setstring stamina,#v(strtofloat(#s(stamina)) - 1);
this.time = 30;
}
this.time --;
}
}


Try something alonge those lines :o

General
06-24-2001, 10:05 AM
Send me it i'll fix it : )
Yah Variables will work Alot better (Like Falados said)

Marco2002
06-24-2001, 02:57 PM
use a save[index] variable
it's much better for those things

General
06-25-2001, 01:39 AM
Yah, send it to me too...

PS: I am supersonic, as stated below, i am cooler