ID:318628
 
Say you have an object that when equipped can give you the ability to make pizza when activated. To activate this obj and any others that you equip all you have to do is use the activate verb. Now when programming this activate verb my goal is to allow the effects of any equipped object to come in effect.

my problem is I dont want to have to loop through every obj I made for the effects to come into effect.
i.e
mob/verb/activate
for(obj in inventory)
if(obj.active)
blah blah blah
if(obj.active)
blah blah blah
etc. etc. etc.


What I'd prefer to do is have an obj be defined like this

obj/X
proc
XXX(mob/M)
while(active)
M.verbs+= make_pizza
M.verbs-= make_pizza


My problem is that then I'd have to call every objects activation proc. Is there a better way to call the activation procs of each object in the users inventory only, when using the activation verb instead of calling every obj that I've ever made's activation proc?
Any Ideas
In response to Raruno
Raruno wrote:
Any Ideas

I had an idea until you deleted that post for some reason.

Also, don't bump until it's been 24 hours and your post is off the front page.
Was meaning to edit the old one and accidentally made a new one, and next time I'll wait to bump
Well, in that case.

You really need to clarify what you mean. This is all very muddled and I'm not exactly sure what you're asking. Give me a specific example of what you want and what your current problem is.