ID:148804
 
I dont get why these arent teleporting me to the area given. I mean, I typed in 30,8,2. then stepped on the stairs and nothing happend but me walking on it...If you know whats wrong, please correct this. thanks

mob/stairsup
icon='Turf.dmi'
density = 0
icon_state="stairsup1"
name="stairs"
var/dstx = 1
var/dsty = 1
var/dstz = 1
Entered(usr)
usr:loc = locate(dstx,dsty,dstz)

mob/stairsdown
icon='Turf.dmi'
icon_state="stairsdown1"
name="stairs"
density = 0
var/dstx = 1
var/dsty = 1
var/dstz = 1
Entered(usr)
usr:loc = locate(dstx,dsty,dstz)

mob/GM/verb/mkstairs(a as num,b as num,c as num)
set category = "Admin"
var/choice = input("Up/down?") in list("Up","Down")
if(choice == "Up")
var/mob/S = new /mob/stairsup(usr.loc)
S:dstx = a
S:dsty = b
S:dstz = c
if(choice == "Down")
var/mob/S = new /mob/stairsdown(usr.loc)
S:dstx = a
S:dsty = b
S:dstz = c
try using Enter instead of Entered
In response to Soori-99
Soori-99 wrote:
try using Enter instead of Entered

Nope, that isn't the problem. Entered() is correct for a teleport turf, and Enter() usually isn't.

Lummox JR
Branks wrote:
I dont get why these arent teleporting me to the area given. I mean, I typed in 30,8,2. then stepped on the stairs and nothing happend but me walking on it...If you know whats wrong, please correct this. thanks

Your code is deeply disturbing. You're using the : operator everywhere, which is really bad. In most of those cases it looks like you should be able to use . just as easily.

But the biggest problem is usr in Entered(). Egads. No no no. Although you did put it in as an argument, what you really should do is give that argument a different name. And make it a type atom/movable, so you can use the . operator.
turf/teleport
Entered(atom/movable/A)
A.loc = ...

Lummox JR
In response to Lummox JR
O.o sorry for misleading you branks i was never good with turfs lol
mob/stairsup
icon='Turf.dmi'
density = 0
icon_state="stairsup1"
name="stairs"
var/dstx = 1
var/dsty = 1
var/dstz = 1
Entered(mob/M)
M.loc = locate(dstx,dsty,dstz)

mob/stairsdown
icon='Turf.dmi'
icon_state="stairsdown1"
name="stairs"
density = 0
var/dstx = 1
var/dsty = 1
var/dstz = 1
Entered(mob/M)
M.loc = locate(src.dstx,src.dsty,src.dstz)

mob/GM/verb/mkstairs(a as num,b as num,c as num)
set category = "Admin"
var/choice = input("Up/down?") in list("Up","Down")
if(choice == "Up")
var/mob/S = new/mob/stairsup(usr.loc)
S.dstx = a
S.dsty = b
S.dstz = c
if(choice == "Down")
var/mob/S = new/mob/stairsdown(usr.loc)
S.dstx = a
S.dsty = b
S.dstz = c

If you dont mind I just changed everything...should work
In response to K'ros Trikare
lol sorry, I already figured it out after the 50th try so that code is useless. thanks anyways :)