Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Image layers (https://forums.graalonline.com/forums/showthread.php?t=62101)

Yen 11-06-2005 01:29 AM

Image layers
 
I have an NPC and a showimg.
The NPC's layer is 0.
The showimg is just below the center of the NPC.
The problem is that I want to show the showimg above the NPC, but below the player. If I set the showimg's layer to 0, it goes below the NPC. If I set the showimg's layer to 1, it goes above the player.

Is there any way around this?

ZeLpH_MyStiK 11-06-2005 01:50 AM

Change the image of the NPC to another showimg, so you would have two showimgs. Then just do the showimg for the NPC after the regular showimg (both at layer 0).
That should work, if not it's the othe way around.

Yen 11-06-2005 06:15 AM

Dun work. :(

excaliber7388 11-06-2005 07:16 PM

layer .5 :D

Riot 11-06-2005 07:38 PM

Quote:

Originally Posted by excaliber7388
layer .5 :D

Except for that whole thing where layers are integers. ;)

ZeLpH_MyStiK 11-06-2005 07:45 PM

Quote:

Originally Posted by excaliber7388
layer .5 :D

Must you post nonconstructive answers?


You can try using two showimgs. For the showimg you want on top, add .01 to the x or y coordinate. It'll move a tiny bit, but its the only solution i can think of.

excaliber7388 11-06-2005 08:21 PM

You think I'm kidding? XD okay, maybe a little, but I'm not sure it will show above another NPC, but changeimgvis #,.5; puts the image under the player. :)

napo_p2p 11-06-2005 08:57 PM

Quote:

Originally Posted by excaliber7388
You think I'm kidding? XD okay, maybe a little, but I'm not sure it will show above another NPC, but changeimgvis #,.5; puts the image under the player. :)

Layers are integers, not floats...

Yen 11-06-2005 09:18 PM

Nothing here works. :(

napo_p2p 11-06-2005 09:29 PM

Try using drawunderplayer() in the NPC image then a layer of 1 in the showimg.

Yen 11-06-2005 10:57 PM

drawunderplayer is deprecated.. It's the same thing as layer = 0

ZeLpH_MyStiK 11-07-2005 12:23 AM

well it seems that when you have two showimgs of the same layer, the image with the greater x and y coordinates will show on top. so you might think about that.

Edit: eww dont call me ZeLpH_MyStiK lol this is ShadowBlaze

napo_p2p 11-07-2005 12:23 AM

Oops, I misread what you wanted :P.

Stemming off from what ZeLpH_MyStiK said. It is possible with two showimgs.

Yen 11-07-2005 01:09 AM

That's not right..
The image on the very bottom is big. It's around 80x112 pixels.
The image I want below the player, but above the bottom image is only 16x32 pixels.
No matter where I place it, it still draws below the bigger one.

napo_p2p 11-07-2005 01:26 AM

2 Attachment(s)
Big Hint: drawunderplayer() in the NPC makes layer 1 not go over the player.

I've been able to get the effect you want using two showimgs. You can see in the attachments that both showimgs don't go over the player, and I am able to set which one goes on top.

Yen 11-07-2005 01:36 AM

2 Attachment(s)
x-x' It won't work for me..
See if you can get it to work.. It may be different online.

versus_fbarrel.png is drawn at the very bottom.
versus_fgrapes.png is draw above the barrel, but below the barrel.

napo_p2p 11-07-2005 01:59 AM

1 Attachment(s)
Quote:

Originally Posted by Yen
x-x' It won't work for me..
See if you can get it to work.. It may be different online.

versus_fbarrel.png is drawn at the very bottom.
versus_fgrapes.png is draw above the barrel, but below the barrel.

versus_fgrapes.png is draw above the barrel, but below the player*?

I did that with GS1 clientside (level editor) and two showimgs.

Yen 11-07-2005 02:07 AM

versus_fgrapes.png has to be at the barrel's x+1.5 and the barrel's y+4.

I think the problem is that the image I'm using isn't versus_fgrapes.png, it's a sprite sheet. It might be using the dimensions of the sprite sheet to determine whether or not to draw under, not the image's dimensions after I use changeimgpart..


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

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