Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-08-2002, 08:18 PM
billybob53 billybob53 is offline
Banned
Join Date: Nov 2002
Location: Usually in wy own world but at the moment in England
Posts: 33
billybob53 is on a distinguished road
Send a message via AIM to billybob53 Send a message via Yahoo to billybob53
img layers

Just wondering.... How do you make one image show over another?

I am making a custom Status bar and the Status image shows over the HP so u can't see it.

How do i change the layering? please help.
Reply With Quote
  #2  
Old 12-08-2002, 08:46 PM
Ningnong Ningnong is offline
Registered User
Ningnong's Avatar
Join Date: Nov 2002
Location: < -- way
Posts: 262
Ningnong is on a distinguished road
doh

This has been posted before, but just to benefit you:

if you are using showimg's, then a showimg with an index of 201 will show over an index of 200.

Also, you can change the image layer.

changeimgvis index,layer;

eg

//#CLIENTSIDE
if (playerenters || timeout){
showimg 200,your_hp_bar.gif,100,100;
changeimgvis 200,4;
timeout = .05;
}

note: 4 draws on the players screen.
1 = same layer as player.
2 = layer over player
4 = on stats bar. co - ordinates change to screen co ordinates.

therefore, u can use this:

//#CLIENTSIDE
if (playerenters || timeout){
showimg 200,your_hp_bar.gif,screenwidth/2,screenheight/2;
changeimgvis 200,4;
timeout = .05;
}


* was an example *


P.S if you have multiple 'showimg'' and want all of them to have a layer of 4, i suggest using a for loop (saves work)

instead of

changeimgvis 200,4;
changeimgvis 201,4;
changeimgvis 202,4;
changeimgvis 203,4;

use:

for (i=0;i<=203;i++) changeimgvis i,4;

-Ningnong
Reply With Quote
  #3  
Old 12-08-2002, 09:16 PM
billybob53 billybob53 is offline
Banned
Join Date: Nov 2002
Location: Usually in wy own world but at the moment in England
Posts: 33
billybob53 is on a distinguished road
Send a message via AIM to billybob53 Send a message via Yahoo to billybob53
oh.... ok, but now theres another problem...

NPC Code:
changeimgpart 402,0,0,int(playermp),25;
showimg 402,mptest.gif,screenwidth-550,screenheight-400;



The problem with that is it doesn't get lower in terms with the player's MP.

(note: the full image X is 200)

Please help..
Reply With Quote
  #4  
Old 12-09-2002, 12:13 AM
Ningnong Ningnong is offline
Registered User
Ningnong's Avatar
Join Date: Nov 2002
Location: < -- way
Posts: 262
Ningnong is on a distinguished road
I think you are using something like

if (playerenters){
do all this stuff;
}

well that only occurs once, you need to have a timeout loop to keep checking the players mp

example:

//#CLIENTSIDE
if (playerenters || timeout){
changeimgpart 402,0,0,int(playermp),25; //<your script\/
showimg 402,mptest.gif,screenwidth-550,screenheight-400;
timeout = .1;
}
Reply With Quote
  #5  
Old 12-09-2002, 04:20 AM
billybob53 billybob53 is offline
Banned
Join Date: Nov 2002
Location: Usually in wy own world but at the moment in England
Posts: 33
billybob53 is on a distinguished road
Send a message via AIM to billybob53 Send a message via Yahoo to billybob53
i used int(playermp) as the x value, and the full img X=200.

But when the playerMP equals 0 it is still visible by like 25%....

Whats the equation for a X=200 img to equal the Player MP?
Reply With Quote
  #6  
Old 12-10-2002, 03:31 AM
Com013 Com013 is offline
Registered User
Join Date: Aug 2002
Location: GMT+1
Posts: 381
Com013 is on a distinguished road
Re: doh

Quote:
Originally posted by Ningnong
if you are using showimg's, then a showimg with an index of 201 will show over an index of 200.
No. It is only sorted by layer, z, y, and x. (In that order).
But you can even use layers above 4 to make sure a certain image is displayed over an other. *still waiting for the possibility to attach images to each other*
__________________
Com013
Former Admin of the LAT on Graal The Adventure

e-mail: [email protected]
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 03:49 PM.


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