• 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.

is this a bad Trigger

Status
Not open for further replies.
Level 12
Joined
Nov 13, 2010
Messages
254
i need to know if this is a bad trigger
  • Regrow Trees Setup
    • Events
      • Time - Elapsed game time is 2.00 seconds
    • Conditions
    • Actions
      • Destructible - Pick every destructible in (Entire map) and do (Actions)
        • Loop - Actions
          • Trigger - Add to RegrowTrees <gen> the event (Destructible - (Picked destructible) dies)
  • RegrowTrees
    • Events
    • Conditions
    • Actions
      • Custom script: local destructable BADTREE = GetDyingDestructable()
      • Wait 20.00 seconds
      • Custom script: call DestructableRestoreLife( BADTREE, GetDestructableMaxLife(BADTREE), true )
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
It is a very naughty trigger! The bits used to store it were cursed by Satan himself! You will need to re-create it from scratch surrounded by incense while reciting verses from the Bible to make sure Satan does not curse it again and it becomes a good trigger. Ok enough messing around with grammar, time to get serious and technical.

Regrow Trees Setup does not work if there are more than 32 or 64 (some low number) of destructible on the map. The enumeration has a very low limit, certainly not the thousands which are normally the case with trees. You will need to break the map into very small units and then enumerate each such unit separately. You may need to use multiple threads for this to avoid hitting the op-limit.

Not all destructibles are trees. You may want to add some checks before adding them to the trigger.
 
Level 12
Joined
Nov 13, 2010
Messages
254
  • Regrow Trees Setup
    • Events
      • Time - Elapsed game time is 2.00 seconds
    • Conditions
    • Actions
      • Destructible - Pick every destructible in (Playable map area) and do (Actions)
        • Loop - Actions
          • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Destructible-type of (Picked destructible)) Equal to (==) Felwood Tree Wall
            • Then - Actions
              • Trigger - Add to RegrowTrees <gen> the event (Destructible - (Picked destructible) dies)
            • Else - Actions
it seams to work
 
Status
Not open for further replies.
Top