Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-31-2010, 12:47 AM
ffcmike ffcmike is offline
Banned
Join Date: Jul 2004
Location: London
Posts: 2,029
ffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond repute
Send a message via AIM to ffcmike Send a message via MSN to ffcmike
Showimg Layers and Players

So I've been attempting to script those little water/swamp ripples you see around the players feet on most servers whenever near water/lava or on top of swamp grass,
(For those that don't know this is one of several built-in features which is specially disabled by Stefan on servers such as GK and Zone, which has also been done on Classic).

My problem is quite simply that displaying this above the player be it by showimg, showani, within a Weapon NPC, or a Gani Attribute always seems to result in displaying above other players as well, when it ought be displayed above the intended player and below anybody in front of them.

Anybody aware of any possible workarounds/solutions or could I be missing something?
I have definately set the layer (and toyed with decimal layer as had been posted several times in the past, don't think it is supposed to work) but always end up with the problem of displaying below all players or above all players.
Reply With Quote
  #2  
Old 01-31-2010, 01:59 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Nope, had the same problem.
Reply With Quote
  #3  
Old 01-31-2010, 02:06 AM
ffcmike ffcmike is offline
Banned
Join Date: Jul 2004
Location: London
Posts: 2,029
ffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond repute
Send a message via AIM to ffcmike Send a message via MSN to ffcmike
Quote:
Originally Posted by DustyPorViva View Post
Nope, had the same problem.
Oh well......

I had noticed several threads with a similar problem just not in the same order, i'm sure they would benefit from a fix for this on iPhone!
Reply With Quote
  #4  
Old 01-31-2010, 02:16 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Would be nice if there were perhaps an image.clientlayer = x; that would apply a layer locally for just the player.
Reply With Quote
  #5  
Old 01-31-2010, 02:20 AM
ffcmike ffcmike is offline
Banned
Join Date: Jul 2004
Location: London
Posts: 2,029
ffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond repute
Send a message via AIM to ffcmike Send a message via MSN to ffcmike
Quote:
Originally Posted by DustyPorViva View Post
Would be nice if there were perhaps an image.clientlayer = x; that would apply a layer locally for just the player.
I was thinking something similar except in the case of displaying images on your client over multiple players you'd need something to distinguish each player as the owner, perhaps this variable could be set automatically within Gani Attributes just you'd need to specify if the layering applies.
Reply With Quote
  #6  
Old 01-31-2010, 02:49 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Quote:
Originally Posted by ffcmike View Post
I was thinking something similar except in the case of displaying images on your client over multiple players you'd need something to distinguish each player as the owner, perhaps this variable could be set automatically within Gani Attributes just you'd need to specify if the layering applies.
findimg(200).layer = 3;
findimg(200).clientlayer = 1;
^ It would draw under the player, but over all other players.

findimg(200).layer = 1;
findimg(200).clientlayer = 2;
^ Would draw under all other players, but over your player.
Reply With Quote
  #7  
Old 01-31-2010, 02:59 AM
ffcmike ffcmike is offline
Banned
Join Date: Jul 2004
Location: London
Posts: 2,029
ffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond repute
Send a message via AIM to ffcmike Send a message via MSN to ffcmike
Quote:
Originally Posted by DustyPorViva View Post
findimg(200).layer = 3;
findimg(200).clientlayer = 1;
^ It would draw under the player, but over all other players.

findimg(200).layer = 1;
findimg(200).clientlayer = 2;
^ Would draw under all other players, but over your player.
While this would be good I think it would give the same problem for when an Image displaying on another player is also displaying on top of a different other player.
Reply With Quote
  #8  
Old 01-31-2010, 07:27 AM
tempandrew tempandrew is offline
Registered User
Join Date: May 2005
Posts: 98
tempandrew is on a distinguished road
Showimg layers are notoriously stubborn. You don't know the extent of how mad I've gotten screwing around with images going on top of other images. Basically, if you need an image to show above one person and not the other, you're screwed.

On another note, if you have several images you need in specific order on top of each other, you're also screwed because you basically have just layers 1, 2, and 3 to work with. Layer 4 I believe is reserved for applying to the screen, and not the x,y and all layers above that are non-existent.

This is one of the features I would love to see in v6, as I know Stefan's doing something with tilelayers for the next version.
Reply With Quote
  #9  
Old 01-31-2010, 07:40 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Quote:
Originally Posted by ffcmike View Post
While this would be good I think it would give the same problem for when an Image displaying on another player is also displaying on top of a different other player.
Then perhaps the ability to set the layer of a gani attribute(which would be relative to the player, like the default effects are).
Reply With Quote
  #10  
Old 01-31-2010, 05:15 PM
12171217 12171217 is offline
Banned
Join Date: Jan 2009
Posts: 453
12171217 has a spectacular aura about
Can't you add sprites to the player's current gani via script? Add one for the effect by his feet.
Reply With Quote
  #11  
Old 01-31-2010, 11:23 PM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
It's not a hard thing to do in a gani. In this case you should make a custom sprites.png and use SPRITES in the gani, but even if that weren't an option you could still put the images in a gani.
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #12  
Old 02-21-2010, 06:08 AM
ffcmike ffcmike is offline
Banned
Join Date: Jul 2004
Location: London
Posts: 2,029
ffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond repute
Send a message via AIM to ffcmike Send a message via MSN to ffcmike
Interestingly I came across this problem initially on a GMAP, but noticed it seems to work fine within single levels, I guess this is because X and Y are handled differently in ganis?
Reply With Quote
  #13  
Old 02-21-2010, 11:07 AM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
I had a similar problem- for it to work on a GMAP I had to use this (inside a gani script) for the position

HTML Code:
x = int(player.x * 1000) / 1000;
y = int(player.y * 1000) / 1000;
__________________
Reply With Quote
  #14  
Old 02-21-2010, 09:11 PM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
That's silly, why would you do that?
If you're worried about it showing at (player.x,player.y) relative to the gmap instead of the level, just use modulus 64.
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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:20 PM.


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