ID:156940
 
I know this has probably been asked many times and answered also, but I couldnt find anything useful to me.

How do I, using the Isometric Maps, make it to where I can have players roam multiple Zs or atleast multiple levels on the same map.. So say, a upstairs and a downstairs are on the same map. If not possible. Because of stacking objects.. How do I put two maps together, say 1,1,1 is below 1,1,2 and if on 1,1,2 then 1,2,1 is visible is nothing is on that spot on map 2.

Hopefully thats not confusing.

Thanks for your time.
I've actually thought about that before.

However it isn't possible unless you create an updating fake-overlay on the current Z level. (At least I think thats what you are trying to say)
You can have non-dense objects for the next level up, setting their invisibility and layer += 1 from the ones below. Make it when they reach a certain part of a stair and go up/down, the invisibility +/- by 1. But this is more for a visual effect than anything else.
In response to Leur
Yes like that indeed. .. .. .. Just not sure how to go about it..
In response to GhostAnime
Yeah.. But still cant stack them in the mapping.. so that wont work.

It would need to be more like laying ...
1,1,2
directly ontop of 1,1,1.

So its visual and interactive.
In response to V3RR3Z
obj
var
height = 0
RedBrickWall
Small
icon = 'ObjectsOne.dmi'
icon_state = "RedBrickSmall"
density = 0
height = 1
Entered()
usr.pixel_z += 16


Something like that for visual effect.. But how would I got about making it to where you cant jump off more then 32 pixel_z and it lowers and heightens on stairs.. say when you enter the stairs.. raise by 8 and leave raise by 8 if going north.. and the oposite if going south?
In response to V3RR3Z
Let me rephrase, by objects, I was referring to /obj. You cannot stack more than /turf and /area but you can stack more than one /obj, /atom and I think datums (but I am not too sure).

They will be on the same Z level, same X/Y as the layers below them - the only difference is that they cannot see the higher levels unless they reach that section.

As mentioned before, this type of system is for visual effects... but you can make certain procedures be called if you're smart enough:
area
house
Entered(atom/A) // When something enters the house /area
A.density = 0 // Critical that they're density is 0 if you do not want someone stuck on the 5th level due to someone on the 1st level.

Exited(atom/A) // Return the density when leaving
if(ismob(A)) A.density = 1
else A.density = initial(A.density)

obj/Multi_level
house
density = 0
invisibility = 0
Lv1
Stairs
SteppedOn(atom/A) // Custom procedure, search for it
if(A.dir & NORTH) // If A's dir is NORTH, NORTHEAST or NORTHWEST, this is called. Assume that here north = up the stairs, south is getting off.
A.layer++
A.see_invisibility++
else if(A.dir & SOUTH) // or have this in SteppedOff()
A.layer--
A.see_invisibility--

Lv2 // Still density = 0
invisibility = 1
floor/icon='floor.dmi'


For visual effects of the same room on different Z's, currently not possible with BYOND as far as I know (with the exception of using client.eye and setting it on the previous Z, which lets you see only on that floor and makes you feel like a voyageur).
In response to V3RR3Z
1) Use <DM> </DM> tags to show a snippet

2) NEVER, EVER use usr in movement procedures, including Enter()

3) You check their dir (see my snippet on my previous post here) and increase/decrease accordingly.
In response to GhostAnime
Ok heres what I got and it works.

turf
var
height = 0
Stairs
RedBrick
One
icon = 'StairsOne.dmi'
icon_state = "RedBrickStairs"
density = 0
height = 1
Enter(atom/A)
usr = A
if(usr.dir == SOUTH)
usr.pixel_z -= 8
return ..()
if(usr.dir == NORTH)
usr.pixel_z += 8
return ..()
if(usr.dir == EAST)
..()
if(usr.dir == WEST)
..()
Exit(atom/A)
usr = A
if(usr.dir == SOUTH)
usr.pixel_z -= 8
return ..()
if(usr.dir == NORTH)
usr.pixel_z += 8
return ..()
if(usr.dir == EAST)
usr.pixel_z -= 8
return ..()
if(usr.dir == WEST)
usr.pixel_z -= 8
return ..()


I am now wondering how to make it to where if you move NORTH SOUTH EAST WEST that it check if for an object in the location and checks to see if usr height is the same as obj.. if not then you cant go there..
In response to V3RR3Z
As I said before, do NOT use usr. If you do not heed to this warning, be prepared to tackle down many "mysterious bugs" that will appear due to this (assuming if it will be a multiplayer).

If EAST and WEST does nothing, there's no point of having an if() statement for both of them.
if(X == Y)
...
if(X == Y)
...

return..(A) // no matter the result of Xs if(), this will be called (assuming it isn't stopped in the if())


You can use locate() to grab the object ahead and check the height
var/cliff/F = locate() in get_step(X, X.dir)
if(F) // if there's a /cliff ahead of X
F.die("fell down the cliff")