ID:1509352
 
(See the best response by KickingKangaroo.)
Code:
obj
Crafting_Bench
icon='Benches.dmi'
icon_state= "1"
density=1

mob
verb
Craft()
if(src.name in oview(1)= "Crafting Bench")
usr<< "Test1"


Problem description: By using the verb, I expect that if there is an object with the name "Crafting Bench" in oview(1) that the desired action would take place. Any sollution, or way to refer to a (Specific) object in oview()?

Best response
Could be wrong but I think you have to loop through them and then do the if statement to check their name inside that loop. You can tinker with that or wait for someone who actually knows what they are talking about to give you an answer.

mob/verb/craft()
for(var/obj/O in oview(1))
if(O.name == "Crafting Bench")
src << "There is a crafting bench near you."
This worked out for me. Thanks for the assistance.
Post above is right. Try it out. Also, you can use istype() instead of comparing the name.
In response to Wks60
No problem good luck with your game, let me know when it is ready to try out :P
Could also use "locate(/obj/Crafting_Bench) in oview(1)". If you use a for() loop, you should expect to repeat the code "for each creating bench nearby".
This project of mine is mostly something I'm using to learn DM through. But, if it turns out to have alright mechanics, I may continue it xD