i have this code
turf
house1exit
icon = 'turfs.dmi'
icon_state = "door"
Enter()
if(src.type==/mob/Enemies)
return
else
usr.loc = locate(/turf/house1enter)
house1enter
icon = 'turfs.dmi'
icon_state = "door"
Enter()
if(src.type==/mob/Enemies)
return
else
usr.loc = locate(/turf/house1enter)
and it wont let me out of the room im pretty sure the code isnt that good so could you help me clean it up
ID:292224
![]() Mar 7 2011, 2:52 pm
|
|
![]() Mar 7 2011, 6:32 pm
|
|
You don't have an idea who the src is. As for usr, I would't trust it.
|
Quixotic wrote:
You don't have an idea who the src is. As for usr, I would't trust it. > turf Qui, since you idnt answer me before, can you answer me now, do you have msn? |
http://www.byond.com/members/Falacy/forum?id=30092#30114
Incase you haven't noticed. |
src is the turf (what its defined under), usr is whatever is controlling the movement (not necessarily the thing entering the door). You should use a variable from the passed arguments, like Qtips showed. Also, instead of returning 1, you should probably use return ..() This way, any higher level parent calculations still get taken into account.
|