ID:155001
 
I have a special macro that I want to be called whenever Q is pressed. This macro would call an object dependent verb. I was trying to use call when I realized that I need to specify the verb. So I tried using paths (didn't work). I was hoping to avoid switch/if statements. Any ideas on how I should approach this?
I'm not exactly sure if you're looking to call a particular obj's verb, or just any, but do you see how this could work? Do you mean an obj in the user's contents, or somewhere else? Or for that matter, more than one object! Well anyways I would imagine the following would work for all of them...:


atom
proc
MacroAction()

mob
proc
push_Q()
for(var/obj/o in src)
o.MacroAction()


obj
MacroAction()
world << "It works!"
In response to Speedro
Doah! I should've been able to figure that out! Thanks. I'll see how far I can go from here.