I got this code from a tutorial, it makes a clicking icon wherever the user clicks for a few seconds then disapears. How can i change it so it only works if you click on a turf?
mob
var/c=0
client.Click(O)
usr.c=1
walk_to(usr,O)
var/o=image('cursor.dmi',O,"click")
src << o
sleep(2)
usr.c=0
while(get_dist(usr,O) >0)
sleep(2)
if(usr.c==1)
del(o)
del(o)
client.Move()
usr << "Click to move."
Mabe something that does: if src is turf walk there else do nothing
</<>
ID:176896
Nov 30 2002, 2:32 am (Edited on Nov 30 2002, 2:51 am)
|
|
Nov 30 2002, 2:41 am
|
|
Instead of refering to client/Click(), set it up to use turf/Click() instead, then it will only happen when you click on turfs.
|