ID:267645
 
I just can't win. If I have the town map and the item shop enabled, I can go inside the item shop and out fine. But then if I add the weapon shop. When I walk into the item shop, it's all black, and I still can't walk into the weapon shop. If it's just the town map and weapon shop map, I can walk on the town map, but the weapon shop turns black when I walk in. If I add the armor shop map to the equation, everything is black. And I've deleted maps and made new ones, but that hasn't done crap. I dunno what I should do. I dunno if this'll help, but here's the code I'm using for the portals:



turf/door2
icon = 'door2.dmi'
Entered()
usr.loc = locate(9,1,9)
turf/door1
icon = 'door1.dmi'
Entered()
usr.loc = locate(9,12,10)
turf/door4
icon = 'door4.dmi'
Entered()
usr.loc = locate(9,1,8)
turf/door3
icon = 'door3.dmi'
Entered()
usr.loc = locate(17,34,10)
turf/door6
icon = 'door6.dmi'
Entered()
usr.loc = locate(9,1,7)
turf/door5
icon = 'door5.dmi'
Entered()
usr.loc = locate(25,34,10)

And yes, it's not indented right, it got messed up when I pasted it in. Help would be greatly appreciated. Thanks.
Don't.

Use.

usr.

In.

Entered().
In response to Garthor
What am I supposed to use, src?
In response to Rockin' Eli
Look up the arguments for Entered() in the reference.
In response to Garthor
Well.. The reference explained what it was.. But it didn't really explain to me how I'm supposed to fix it.. Or at least it didn't in a simple enough way for a degenerate like myself to understand how to fix the problem. And when I turned usr.loc into src.loc it just filled with errors, so I don't think that's the way to do it.
In response to Rockin' Eli
Look under the part of the entry that says "Args:"
In response to Garthor
I'm supposed to use obj.loc?
In response to Rockin' Eli
try defining the user as something else.. ask yourself what is the user? its a mob right? well you can call the mob M by typing mob/M as mob, i believe. put that in the entered proc like this: Entered(mob/M as mob). now instead of usr you have M. im not sure if this will solve the original problem though.. it might.

ps-i could be wrong.
In response to Siefer
The "as mob" part is pointless. You need an if(ismob(M)) check before manipulating the mob, because it can be an obj as well. Otherwise, that's what you have to do.
In response to Garthor
turf/itemshopin
icon = 'itemshopin.dmi'
Entered()
obj.loc = locate(9,1,3)

That just got me a huge mess of errors. Especially one saying M isn't allowed here..

I don't understand how I can walk through the door, and be brought into a room full of black. I have the coordinates right. And by the way, that code that doesn't have any errors, though doesn't actually work in the game is this one:

turf/itemshopin
icon = 'itemshopin.dmi'
Entered()
usr.loc = locate(9,1,3)

I don't see why it works sometimes, and not others. It. Makes. No. Sense.
In response to Rockin' Eli
It only works when the person who is controlling the movement enters the turf. So if you were pushed into the turf, the wrong person would be moved.
In response to Garthor
How would I get pushed?! ><
In response to Rockin' Eli
If you programmed it to push you in some situations. You cannot know that you'll never do something like that, so it's much much better to be on the safe side.