ID:267406
 
Well im making a chair and i want a sit)_ verb on it so when you get near it and press sit you automaticly move to it and face down


please help
Is the chair an obj or turf? That would effect wether you want to move to the obj chair's loc or just move into the chair turf itself.

Is it dense or not? If it's dense, you'll have to check to make sure it's unoccupied.

Here are some examples:
dense turf chair -

turf/chair/verb/sit()
set src in oview(1)
// prevent multiple mobs from sitting here
for(var/mob/M in contents)
usr << "[M] is sitting there!"
return
usr.loc = src // set the mob's loc to prevent density checking
usr.dir = SOUTH // make the mob face south


nondense obj -

obj/chair/verb/sit()
set src in oview(1)
// we can skip the mob check, since Move() will check density

// move the usr into the chair's loc and face the mob south
usr.Move(loc, SOUTH)
In response to Shadowdarke
Also remember if you want it to look like you're actually sitting, then you need an icon state for that.

Also for chairs facing north(up), you may of thought of this already, but in case you haven't, you may want to raise the layer of the chair above the mob, to make it look more realistic as well.

LJR
In response to LordJR
Yeah thanks both of you it worked great



Tarius