Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Server (https://forums.graalonline.com/forums/forumdisplay.php?f=14)
-   -   about setimg (https://forums.graalonline.com/forums/showthread.php?t=2637)

KJS 05-11-2001 01:30 PM

I am use setimg function and stuff that make it so it can be a health bar.
But like when I goto a different level then the level with that weapon on it. then it disapears when the guy gets hurt. I am wondering if there is any way around that... Because that makes it look really bad when I reshow it once it disapears (like you can see the whole image then it resizes it).
well basically I am saying when I use showimg
and I get hurt then my images hide and I am wondering if there is a way around that...

Cyboars 05-11-2001 01:35 PM

NPC Code:

if (playerishurt) {healthbarscripthere;}
if (playerdies) {healthbarscripthere;}
if (playertouchesother){healthbarscript here;}


that or
NPC Code:

if (weaponfired){healthbarscript;timeout=0.05;}
if (timeout){healthbarscript;}



KJS 05-11-2001 01:37 PM

I know
 
I know I can do that
but I was wondering if like there is a way around that... Like if it is a glitch that they disapear or something when you get hurt?
because when I do it that way it like shows the whole big image again and like looks bad for a few seconds... like it will show the huge image then take a second to resize it again...

Cyboars 05-11-2001 01:49 PM

use timeouts, it should work perfectly..it can set your sword to 61(-1) and wont flash or change back, unless you do somthing bad to it.

KJS 05-11-2001 01:58 PM

well the thing that happens
 
the thing that happens is that it has to reload
state.png
(for my timevar)
my timevar also disapears when you get hit...
but for my health bar it works fine pretty much but it blinking...

but like the timevar part is the biggest thing is how it has to reput on state.png and makes it so you see that image like 6 times on the screen then it resizes its self.

Admins 05-11-2001 08:32 PM

showimgs are automatically hidden
when you are hurt,
you should do the showimg commands
all 0.05 seconds

KJS 05-11-2001 08:37 PM

thanks
 
thank you for all your help you guys...

Loriel 05-12-2001 11:54 PM

Why are they hidden, Stefan? That sucks....

Er1c 05-16-2001 11:00 AM

How to get showimg with layer 4 to work correctly
 
I had the same problem you do a while back. What is wrong with your script is that the part that shows the images should NOT be in the timeout loop. You still DO need a timeout loop so that the server recognises the NPC, but don't have the showimg part in that loop.

TB3 05-18-2001 03:04 AM

ACK You People Lag Things!
 
ACK that makes it lag making graal show that image over and over if u know its not going to change unless u are hurt or something do this......

This should work im not sure im doing alot ....

if (playerenters) {this.oldheart=playerhearts;timeout=.5;}

if (timeout) {
if (!playerhearts=this.oldheart) {this.oldheart=playerhearts;this.mode=1}
if (this.mode=1) {yourscripthere;this.mode=0}

timeout=.05;
}


All times are GMT +2. The time now is 08:01 AM.

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