Water
icon = 'Turfs.dmi'
icon_state = "Water"
density=1
verb
Fish()
set src in view(2)
var/r = rand(1,25)
var/a =new /obj/Items/Tools/Fishing_Pole
if(a in usr.contents)
if(r == 1)
usr<<"You caught nothing!"
else if(r == 2)
usr<<"You caught a Fish!"
usr.Fish+=1
else if(r == 3)
usr<<"You caught a Fish!"
usr.Fish+=1
else if(r == 4)
usr<<"You caught nothing!"
else if(r == 5)
usr<<"You caught nothing!"
else if(r == 6)
usr<<"You caught a Fish!"
usr.Fish+=1
else if(r== 7)
usr<<"Your rod broke!"
del a
else if(r>=8)
usr<<"You caught nothing!"
Problem description:
For some odd reason I cannot seem to get a grasp on object paths in DM. How can I delete the object out of the usr contents list and how can I check if it is in the list?
Now you have a reference to the object in usr (or null, if locate() doesn't find anything).