Well, Im trying to make it so the stairs will always send you one Z level up or down (depending on the stairs) but there is something wrong with this:
turf
stairsup
icon = 'stairs.dmi'
stairs
icon_state = "stairsup"
Entered()
usr.loc = locate(usr.x, usr.y, usr.z+1)
(the "usr.z+1)" part is suppose to be attatched to the line above.)
Everytime I go on the stairs my screen goes black instead of talking me to the room i have layed out on the Z level above.
Thanks,
o)-< Aleis >-(o
ID:175412
![]() Apr 26 2003, 5:41 am
|
|
I see.. I'll try that and get back to the forum in a minute. I see how i messed up now.
Thanks, o)-< Aleis >-(o |
AH! I think my usr.x and such would've worked. I had stairsdown instead of stairsup on the map. Therefore the guy was going to a Z level that didnt exsist.
Thanks anywho, o)-< Aleis >-(o |
usr may seem to work for now, but come later on you will find that it may cause errors, using Entered(mob/M) has the same effect (M is the usr) it is explained more in depth here: http://www.byondscape.com/ascape.dmb/LummoxJR.2002-1104/
|
sorry, im not a subscriber to BYONDscape, but i see how it could affect things (sorta). Anyway, its working now so thanks for the help.
o)-< Aleis >-(o |
You don't need to be a subscriber for the articles (at least, not the ones I've been to). Lummox's "usr Unfriendly" saved my life* on many an occasion.
*What I mean is, it saved me from completely scrapping my code and starting over. |
You want to do something like:
turf
stairsup
icon = 'stairs.dmi'
stairs
icon_state = "stairsup"
Entered(mob/M)
M.loc = locate(M.x, M.y, M.z+1)
The other thing is make sure that you have something on the map exactly 1 z-level above the stairs (ie. if the stairs are at 50,50,1 make sure there is something at 50,50,2)