• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Lot of simple triggers or one complicated?

Status
Not open for further replies.
Level 3
Joined
Jul 7, 2009
Messages
45
Well this is the question. Is is better to have triggers sepperate into simple ones like this example:

  • Trigger 1
    • Events
      • Unit - A unit owned by Player 1 (Red) Gains a level
    • Conditions
      • (Hero level of (Leveling Hero)) Equal to 5
    • Actions
      • Unit - Remove Heal (stage 1) from Storage Area 0000 <gen>
      • Unit - Add Heal (stage 2) to Storage Area 0000 <gen>
      • Trigger - Turn off (This trigger)
  • Trigger 2
    • Events
      • Unit - A unit owned by Player 1 (Red) Gains a level
    • Conditions
      • (Hero level of (Leveling Hero)) Equal to 10
    • Actions
      • Unit - Remove Heal (stage 2) from Storage Area 0000 <gen>
      • Unit - Add Heal (stage 3) to Storage Area 0000 <gen>
      • Trigger - Turn off (This trigger)
Or to have both triggers in one like this:

  • Only Trigger
    • Events
      • Unit - A unit owned by Player 1 (Red) Gains a level
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Hero level of (Leveling Hero)) Equal to 5
        • Then - Actions
          • Unit - Remove Heal (stage 1) from Storage Area 0000 <gen>
          • Unit - Add Heal (stage 2) to Storage Area 0000 <gen>
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Hero level of (Leveling Hero)) Equal to 10
            • Then - Actions
              • Unit - Remove Heal (stage 2) from Storage Area 0000 <gen>
              • Unit - Add Heal (stage 3) to Storage Area 0000 <gen>
            • Else - Actions


Does that make any difference?
 
Level 3
Joined
Jun 26, 2010
Messages
43
I personally like it in one trigger, it gets confusing when you have a bunch of triggers doing practically the same thing, but for a different person, unit, etc..
 
Last edited:
Level 16
Joined
May 1, 2008
Messages
1,605
Moin moin =)

I know only, that the map has a bigger size when you do every time a single trigger instead of combine them. I made a test map with 10 single triggers (event, condition, action) [16,9 kb] and a test map with one trigger and 10 if - then - else [15,9 kb].

Also I think it's faster if you have 2 trigger in 1 instead of having 2 different triggers, because the if you do an action in game, the game checks if one of the trigger match the current action and this would be faster if only one trigger is executed instead of two and more.

The only thing I can say for sure is that it's better to have one initialization trigger instead of more triggers with the map initialization event!

Greetings and Peace
Dr. Boom
 
Status
Not open for further replies.
Top