ID:157347
 
Okay, so a quick explanation:

I'm trying to create a game where z-levels will come into play often; players will be moving 'up' ledges and 'down' holes quite commonly, and I can't seem to figure out how to make it happen when a player enters a 'hole' turf that he's kicked down a z-level.

Forgive me if I'm missing something obvious, I'm fairly new to DM language.

Thanks in advance.
In response to Darkjohn66
A little bit of tweaking and the solution in that thread works like a dream. Thanks, I tried searching but I guess I was searching the wrong things. D:
In response to Darkjohn66
That's quite wrong. The solution here would be:

turf/hole
Entered(var/mob/M)
step(M, DOWN)
..()
In response to Garthor
Garthor wrote:
That's quite wrong. The solution here would be:

turf/hole
> Entered(var/mob/M)
> step(M, DOWN)
> ..()


I replaced my current code with that one to give it a shot, since it's a lot more elegant and it just plain refused to work. The hole instead decided to be on a layer above the mob entering it.
In response to Garral
Not sure what you are saying is wrong. I tested that just now and it worked fine. Things that would cause it to not work would be if the mob can't step down a z-level (blocked by something) or if the turf is not actually there. Seeing what you had, exactly, would help.
In response to Garthor
Copypasted directly from Dream Maker.

    hole
icon = 'hole.dmi' //Drops the player down a Z-level when stepped on.
Entered(atom/movable/A)
if(ismob(A))
var/mob/M = A
M.loc = locate(x,y,z-1)
/* Entered(var/mob/M) //Just doesn't work for some reason.
step(M, DOWN)
..()*/


Not shown is all the turfs above it in the code block, they wouldn't conflict with it, I figured. The commented block of code is indented correctly; the DM tag on the forums makes it look like it's not.
In response to Garral
Oh, right: you probably are locking out movement in mob/Move() instead of client/Move() as would be appropriate. This prevents you from using step() or Move() to move a mob when you want to, forcing you to rely on altering the loc directly (which is sloppy).
In response to Garthor
Well, I haven't fiddled with the Move() proc at all, and step/move/walk is working just fine for my map generator mob, it just seems to crap itself and fail to work when a mob moves onto a hole with your codeblock.

That's what's confusing me about this.(Also I should probably post another thread for help on my map generator because getting it to generate consistent turf is starting to hurt my brain.)