ID:167251
 
Is it possible to set a verb as usable when the object that the verb belongs to is somewhere besides in your inventory or on the ground.
For example if there was a box on the ground and you could view the inventory of that box in a statpanel. How would you make it so you can use a verb associated to that object when it is in that box and when it is in your inventory, but no other times. I know you can use set src in view(0) to have it only apply to objects in your inventory.
I think you're looking for set category=null
In response to Mysame
That has to do with displaying the verb in a stat panel. I want to be able to use the verb on a right click menu, but only in certain places.
In response to Drumersl
I was thinking I could pass the object that the item is in into the verb and then check if it is a certain kind of object, (like a box), and then do set src in O.contents, where O is the box. But how would I do something like
set src in view(1)||O.contents 
//Or
set src in view(1)||if(istype(O.loc,/obj/box))

I know those wouldn't work but that is what I am trying to do.
In response to Drumersl
you could try something like if(object in usr || (object in O.contents && O in view(1)))