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 11-06-2005, 01:29 AM
Yen Yen is offline
Banned
Yen's Avatar
Join Date: Oct 2005
Location: Nova Scotia, Canada
Posts: 1,085
Yen is an unknown quantity at this point
Send a message via AIM to Yen Send a message via MSN to Yen
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?
Reply With Quote
  #2  
Old 11-06-2005, 01:50 AM
ZeLpH_MyStiK ZeLpH_MyStiK is offline
Scripter
ZeLpH_MyStiK's Avatar
Join Date: May 2003
Location: NYC
Posts: 553
ZeLpH_MyStiK is on a distinguished road
Send a message via MSN to ZeLpH_MyStiK Send a message via Yahoo to ZeLpH_MyStiK
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.
__________________
Reply With Quote
  #3  
Old 11-06-2005, 06:15 AM
Yen Yen is offline
Banned
Yen's Avatar
Join Date: Oct 2005
Location: Nova Scotia, Canada
Posts: 1,085
Yen is an unknown quantity at this point
Send a message via AIM to Yen Send a message via MSN to Yen
Dun work.
Reply With Quote
  #4  
Old 11-06-2005, 07:16 PM
excaliber7388 excaliber7388 is offline
Banned
excaliber7388's Avatar
Join Date: Jul 2005
Location: US
Posts: 5,229
excaliber7388 can only hope to improve
Send a message via AIM to excaliber7388
layer .5
Reply With Quote
  #5  
Old 11-06-2005, 07:38 PM
Riot Riot is offline
Delteria Management
Join Date: Nov 2003
Location: Seminole County, Florida
Posts: 280
Riot is on a distinguished road
Quote:
Originally Posted by excaliber7388
layer .5
Except for that whole thing where layers are integers.
Reply With Quote
  #6  
Old 11-06-2005, 07:45 PM
ZeLpH_MyStiK ZeLpH_MyStiK is offline
Scripter
ZeLpH_MyStiK's Avatar
Join Date: May 2003
Location: NYC
Posts: 553
ZeLpH_MyStiK is on a distinguished road
Send a message via MSN to ZeLpH_MyStiK Send a message via Yahoo to ZeLpH_MyStiK
Quote:
Originally Posted by excaliber7388
layer .5
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.
__________________
Reply With Quote
  #7  
Old 11-06-2005, 08:21 PM
excaliber7388 excaliber7388 is offline
Banned
excaliber7388's Avatar
Join Date: Jul 2005
Location: US
Posts: 5,229
excaliber7388 can only hope to improve
Send a message via AIM to 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.
Reply With Quote
  #8  
Old 11-06-2005, 08:57 PM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
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...
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote
  #9  
Old 11-06-2005, 09:18 PM
Yen Yen is offline
Banned
Yen's Avatar
Join Date: Oct 2005
Location: Nova Scotia, Canada
Posts: 1,085
Yen is an unknown quantity at this point
Send a message via AIM to Yen Send a message via MSN to Yen
Nothing here works.
Reply With Quote
  #10  
Old 11-06-2005, 09:29 PM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
Try using drawunderplayer() in the NPC image then a layer of 1 in the showimg.
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote
  #11  
Old 11-06-2005, 10:57 PM
Yen Yen is offline
Banned
Yen's Avatar
Join Date: Oct 2005
Location: Nova Scotia, Canada
Posts: 1,085
Yen is an unknown quantity at this point
Send a message via AIM to Yen Send a message via MSN to Yen
drawunderplayer is deprecated.. It's the same thing as layer = 0
Reply With Quote
  #12  
Old 11-07-2005, 12:23 AM
ZeLpH_MyStiK ZeLpH_MyStiK is offline
Scripter
ZeLpH_MyStiK's Avatar
Join Date: May 2003
Location: NYC
Posts: 553
ZeLpH_MyStiK is on a distinguished road
Send a message via MSN to ZeLpH_MyStiK Send a message via Yahoo to ZeLpH_MyStiK
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
__________________
Reply With Quote
  #13  
Old 11-07-2005, 12:23 AM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
Oops, I misread what you wanted :P.

Stemming off from what ZeLpH_MyStiK said. It is possible with two showimgs.
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote
  #14  
Old 11-07-2005, 01:09 AM
Yen Yen is offline
Banned
Yen's Avatar
Join Date: Oct 2005
Location: Nova Scotia, Canada
Posts: 1,085
Yen is an unknown quantity at this point
Send a message via AIM to Yen Send a message via MSN to Yen
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.
Reply With Quote
  #15  
Old 11-07-2005, 01:26 AM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
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.
Attached Images
  
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote
  #16  
Old 11-07-2005, 01:36 AM
Yen Yen is offline
Banned
Yen's Avatar
Join Date: Oct 2005
Location: Nova Scotia, Canada
Posts: 1,085
Yen is an unknown quantity at this point
Send a message via AIM to Yen Send a message via MSN to 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.
Attached Images
  
Reply With Quote
  #17  
Old 11-07-2005, 01:59 AM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
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.
Attached Images
 
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote
  #18  
Old 11-07-2005, 02:07 AM
Yen Yen is offline
Banned
Yen's Avatar
Join Date: Oct 2005
Location: Nova Scotia, Canada
Posts: 1,085
Yen is an unknown quantity at this point
Send a message via AIM to Yen Send a message via MSN to Yen
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..
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 11:46 PM.


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