+----------+ | | | | | M | +----#-----+ P Legend: M = Merchant # = counter (with another turf under it) P = player
Current, I am currently able to "talk" to a npc that is standing next to me. After accomplishing that, I decided to add a counter and try to "talk" over this counter. Looking through the online reference (specifically, the "locate" proc), I figured out a way that (to me) would logically work...but it doesn't. Here is the snippet of my code when talking to someone north of the player:
turf/var/talkover=0
turf/town/counter
density=1
talkover=1
icon = 'town.dmi'
icon_state="counter"
proc/actionMenu(mob/player/mychar)
var where
var turf/thisturf
var mob/npc/thisNPC
switch(mychar.dir)
if (1)
where = mychar.y
do
where++
thisturf = locate(/turf/town/counter) in locate(mychar.x, where, mychar.z)
while (!isnull(thisturf) && thisturf.talkover)
thisNPC = locate(/mob/npc) in locate(mychar.x,where,mychar.z)
if (!isnull(thisNPC))
thisNPC.talk(mychar)