ID:147331
 

Enter(mob/M)
usr.loc = locate(/obj/hoix7)
usr.y-=1
return..()

This is attached to a turf. Why would this take me to a black screen instead of where it took me before?
Change usr to M. You have Enter(mob/M) so why are you using usr?
ZLegend wrote:
Enter(mob/M)
usr.loc = locate(/obj/hoix7)
usr.y-=1
return..()

This is attached to a turf. Why would this take me to a black screen instead of where it took me before?

Well, a few reasons.

  • No put usr in proc. Duh!
  • You apparently want this to do something when entering a turf, but you've used the wrong proc entirely. That should be Entered(), not Enter().
  • If your locate() succeeds, it will return an obj, not the turf it's on.
  • If the first /obj/hoix7 found is at a null location, then trying to change y will do no good.
  • Just for future reference, you should take extra tabs out of your code when you post it. Each line has about 3 too many tabs before it. It's a good idea to put <dm> tags around your code, too.

    The correct code would probably look like this:
Entered(mob/M)
if(ismob(M))
for(var/obj/hoix7/O)
if(O.y>1)
M.loc = get_step(O, SOUTH)
return

Lummox JR