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 09-09-2008, 04:36 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
I've been wanting more customizable tile layers for forever and a more flexible layer system.

And I suppose a server option would be needed so nothing is broken.

Basically make it so layer 200+ is the GUI and everything below it can be in the level. Of course nobody will ever need that many but that just makes it similar to image indexes. With that you could put tiles on any layer from 0 to 199 and they would draw above or below the player depending on what layer the player is on.

Example: A Bridge
Layer 0: the whole of the level, including what is under the bridge. Players are here.
Layer 1: This overlayes the bridge over players. Players walk under this if on layer 0.
Layer 50: Shadows Morning
Layer 51: Shadows Noon
Layer 52: Shadows Afternoon

When a player is going to walk onto a bridge, a script switches his layer to 1. This makes the player draw on the bridge and above any players walking below it. Changing to layer 1 means the player is using that layer's tiletypes so even if there is water below the bridge it doesn't matter. A system script hides and shows the shadow layers depending on time of day.

I suppose a way to make it compatible with things as they are now would be to have a tilelayer variable. Tiles would be on layer -1. Putting anything else like the player on layer -1 makes it subject to the tilelayer variable, which controls the tile layer you walk on and such.
__________________

Last edited by Inverness; 09-09-2008 at 04:48 PM..
Reply With Quote
  #2  
Old 04-19-2009, 05:10 PM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
Quote:
Originally Posted by Inverness View Post
Layer 0: the whole of the level, including what is under the bridge. Players are here.
Layer 1: This overlayes the bridge over players. Players walk under this if on layer 0.
[...]
When a player is going to walk onto a bridge, a script switches his layer to 1. This makes the player draw on the bridge and above any players walking below it.
This is pretty much what is already possible with NPCs and attachplayertoobj. It is also pretty ****ty because you could stand next to the bridge and instead of walking onto it, throw a bush right through it into the water.
Reply With Quote
  #3  
Old 04-20-2009, 08:15 PM
fragman85 fragman85 is offline
Banned
Join Date: Mar 2009
Location: Switzerland
Posts: 261
fragman85 is on a distinguished road
Quote:
Originally Posted by Loriel View Post
This is pretty much what is already possible with NPCs and attachplayertoobj. It is also pretty ****ty because you could stand next to the bridge and instead of walking onto it, throw a bush right through it into the water.
Maybe when the Bush enters the Bridge it should also change it's layer?
Reply With Quote
  #4  
Old 04-20-2009, 09:02 PM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
Quote:
Originally Posted by fragman85 View Post
Maybe when the Bush enters the Bridge it should also change it's layer?
I think the entire plateau-ish thing leading up to the bridge needs to be on the upper layer already, but I have no idea how to work that into our tile system.
Reply With Quote
  #5  
Old 04-20-2009, 06:52 PM
DarkIceX DarkIceX is offline
(Developer)
Join Date: May 2002
Location: Canada
Posts: 125
DarkIceX is on a distinguished road
Quote:
Originally Posted by Inverness View Post
I've been wanting more customizable tile layers for forever and a more flexible layer system.

And I suppose a server option would be needed so nothing is broken.

Basically make it so layer 200+ is the GUI and everything below it can be in the level. Of course nobody will ever need that many but that just makes it similar to image indexes. With that you could put tiles on any layer from 0 to 199 and they would draw above or below the player depending on what layer the player is on.

Example: A Bridge
Layer 0: the whole of the level, including what is under the bridge. Players are here.
Layer 1: This overlayes the bridge over players. Players walk under this if on layer 0.
Layer 50: Shadows Morning
Layer 51: Shadows Noon
Layer 52: Shadows Afternoon

When a player is going to walk onto a bridge, a script switches his layer to 1. This makes the player draw on the bridge and above any players walking below it. Changing to layer 1 means the player is using that layer's tiletypes so even if there is water below the bridge it doesn't matter. A system script hides and shows the shadow layers depending on time of day.

I suppose a way to make it compatible with things as they are now would be to have a tilelayer variable. Tiles would be on layer -1. Putting anything else like the player on layer -1 makes it subject to the tilelayer variable, which controls the tile layer you walk on and such.
Pleasepleasepleaseplease Stefan!
__________________

Bloodvayne
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 08:52 PM.


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