• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Trigger] Leak?Can it be done better?

Status
Not open for further replies.
Level 8
Joined
Apr 23, 2011
Messages
322
Are these 2 triggers ok, efficiant, etc.

  • Food rot
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Item - Pick every item in Food no rot <gen> and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of (Picked item)) Equal to Chicken Meat
            • Then - Actions
              • Item - Set life of (Picked item) to ((Current life of (Picked item)) - 1.00)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Item-type of (Picked item)) Equal to Pig Meat
                • Then - Actions
                  • Item - Set life of (Picked item) to ((Current life of (Picked item)) - 1.00)
                • Else - Actions
  • Food dies
    • Events
      • Time - Every 3.00 seconds of game time
    • Conditions
    • Actions
      • Item - Pick every item in (Playable map area) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of (Picked item)) Equal to Chicken Meat
              • ((Picked item) is in Food no rot <gen>) Equal to False
            • Then - Actions
              • Item - Remove (Picked item)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Item-type of (Picked item)) Equal to Pig Meat
                  • ((Picked item) is in Food no rot <gen>) Equal to False
                • Then - Actions
                  • Item - Remove (Picked item)
                • Else - Actions
 
Status
Not open for further replies.
Back
Top