• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Better to have one event with lots of actions, or lots of events with a few actions?

Status
Not open for further replies.
Level 8
Joined
Jan 16, 2008
Messages
156
Currently I use lots of triggers like this for my item system (47 to be exact):

Code:
Runed Gautlets
    Events
        Unit - A unit Acquires an item
    Conditions
        ((Triggering unit) has an item of type Gauntlets of Ogre Strength) Equal to True
        ((Triggering unit) has an item of type Circlet of Nobility) Equal to True
        ((Triggering unit) has an item of type Rare Scroll) Equal to True
    Actions
        Item - Remove (Item carried by (Triggering unit) of type Gauntlets of Ogre Strength)
        Item - Remove (Item carried by (Triggering unit) of type Circlet of Nobility)
        Item - Remove (Item carried by (Triggering unit) of type Rare Scroll)
        Hero - Create |cffffcc00Runed Gauntlets|r|n and give it to (Triggering unit)

Now that I have lots of items, should I combine all of those triggers under a single event or just leave them as seperate triggers?

Basically this boils down to: Does the WC3 engine process events or conditions faster?
 
Level 8
Joined
Oct 3, 2008
Messages
367
It's good to combine all possible things under a single event. However, GUI conditions are slower than ones hand made in Jass. I am unsure which is quicker.

For simplicity's sake, use separate triggers. Or learn Jass. Pick one.
 
Level 8
Joined
Feb 15, 2009
Messages
463
if not extraordinaray much actions are used one is faster and more performant because for a second one a second trigger,event ,condition(maybe also an action) are needed which are all handles and so --->leak(or eat some memory because if the trigger is permanent the stay=D=D)
if done to often it will matter but if you have a single trigger copied once it should not make a change
 
Status
Not open for further replies.
Top