ID:179043
 
I have an object that I atached a verb to now that verb works with all object and I dont know why. someone please help.

obj
diagnostic
icon = 'computer.dmi'
icon_state = "diagnostic"
name = "diagnostic"
density = 1
var
pow = 3
verb/run_a_level_three_diagnostic()
set src in oview(1)
if (src.pow == 2)
usr << ""
else
usr << ""
verb/run_level_one_diagnostic()
set src in oview(1)
if (src.pow == 3)
usr << ""
else
usr << ""
its funny because now I can run diagnostics on plants this didnt happen with my sit verb I atached to a desk I dont know why its doing it now i tried changing the object to a mob but the you could run diagnostics on people and that wasnt cool

please help.
Look carefully at your code:
obj
diagnostic
icon = 'computer.dmi'
icon_state = "diagnostic"
name = "diagnostic"
density = 1
var
pow = 3
verb/run_a_level_three_diagnostic()
set src in oview(1)
if (src.pow == 2)
usr << ""
else
usr << ""
verb/run_level_one_diagnostic()
set src in oview(1)
if (src.pow == 3)
usr << ""
else
usr << ""
See how your verbs are indented at the same level as diagnostic? That means the verb will be availible for every /obj. What you want to do is indent everything under diagnostic 1 more tab to make sure only types /obj/diagnostic inherit those properties.

-James
In response to Jmurph
thank you