Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   level.tilelayers[0].z and you (https://forums.graalonline.com/forums/showthread.php?t=81708)

DarkReaper0 09-07-2008 08:24 PM

level.tilelayers[0].z and you
 
Edit: I suppose the thread should actually be level.tilelayers[0].z ..... crap

I've been wondering for quite some time now why it is that a simple script like this automatically gives someone the ability to walk over tiles.

PHP Code:

//#CLIENTSIDE
function onPlayerEnters() {
  
level.tilelayers[0].z=1//Moves the z value up one
  
level.tilelayers[0].y=1//Moves Y down one so the level still looks the same.


I mean....seriously now....is there a point to this? The tiles dont even draw over the player so to yourself and everyone around you, you're just plain wall-hacking.

And isn't it unsafe to have this clientside anyway...? I'm not too familiar with hacking tools.

DarkReaper0 09-07-2008 09:00 PM

No thoughts?

Chompy 09-07-2008 10:12 PM

You often (almost all the time) need to wait more then 36 minutes to get a respond :p Always been like that, atleast in the scripting section.

Anyways, pretty cool thing you found there :o Should be fixed if you ask me.

Rufus 09-07-2008 10:42 PM

It's just the way Graal handles y/z. The z-axis is pretty much identical to the y-axis in terms of how it's drawn.

LoneAngelIbesu 09-07-2008 10:45 PM

Quote:

Originally Posted by Rufus (Post 1421282)
It's just the way Graal handles y/z. The z-axis is pretty much identical to the y-axis in terms of how it's drawn.

With players, the z-value affects the distance of the body from the shadow. With tilesets, there's no reference point to see the up/down movement. You guys probably know this, though.

coreys 09-07-2008 11:01 PM

Quote:

Originally Posted by Chompy (Post 1421280)
You often (almost all the time) need to wait more then 36 minutes to get a respond :p Always been like that, atleast in the scripting section.

Anyways, pretty cool thing you found there :o Should be fixed if you ask me.

It's been around so long. This is nothing new, just no one knows about it.
Now they will.
gg, guys, gg.

DarkReaper0 09-08-2008 12:08 AM

-shrug- I'm just saying its a silly thing to have.

Admins 09-08-2008 02:59 PM

It's made so that tile layers above zero are not blocking because they are for decoration

xXziroXx 09-08-2008 06:23 PM

Quote:

Originally Posted by Stefan (Post 1421409)
It's made so that tile layers above zero are not blocking because they are for decoration

I believe the "issue" is that the layers can't be displayed above the players.

DarkReaper0 09-09-2008 01:47 AM

Yeah if your going to let us move the z value of the tiles to be decorational....shouldn't we be able to draw them above the player or other useful things? Petition for full tilelayer manipulation please.

Inverness 09-09-2008 04:36 PM

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.

DarkReaper0 09-09-2008 11:49 PM

+1 for Inverness Idea.

xXziroXx 04-19-2009 05:04 PM

Bumping in hopes of Stefan adding this with the next Graal version, as it's probably the most wanted change.

Loriel 04-19-2009 05:10 PM

Quote:

Originally Posted by Inverness (Post 1421598)
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.

DarkIceX 04-20-2009 06:52 PM

Quote:

Originally Posted by Inverness (Post 1421598)
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! :cry:

fragman85 04-20-2009 08:15 PM

Quote:

Originally Posted by Loriel (Post 1485167)
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?

Loriel 04-20-2009 09:02 PM

Quote:

Originally Posted by fragman85 (Post 1485477)
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.


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

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