Trigger Trouble

Pyropenguins

New Member
Reaction score
4
Solved the problem
Trigger:
  • First
    • Events
      • Unit - A unit Begins construction
    • Conditions
    • Actions
      • Unit Group - Remove all units from Chain
      • Unit Group - Add (Triggering unit) to Chain
      • Trigger - Run Next <gen> (checking conditions)

Trigger:
  • Next
    • Events
    • Conditions
    • Actions
      • Set BlockCheck = False
      • Unit Group - Pick every unit in Chain and do (Actions)
        • Loop - Actions
          • Set PickedPoint = (Position of (Picked unit))
          • Custom script: set bj_wantDestroyGroup = true
          • Unit Group - Pick every unit in (Units within 182.00 of PickedPoint matching ((((Matching unit) is A structure) Equal to True) and ((((Matching unit) is in Chain) Equal to False) and ((Owner of (Matching unit)) Equal to (Owner of (Triggering unit)))))) and do (Actions)
            • Loop - Actions
              • Unit Group - Add (Picked unit) to Chain
              • Set BlockCheck = True
          • Custom script: call RemoveLocation (udg_PickedPoint)
          • If (BlockCheck Equal to True) then do (Trigger - Run (This trigger) (checking conditions)) else do (Trigger - Run Last <gen> (checking conditions))

Trigger:
  • Last
    • Events
    • Conditions
    • Actions
      • Set BlockArea[1] = (Units in 1RedPinkGreen L <gen> matching (((Matching unit) is in Chain) Equal to True))
      • Set BlockArea[2] = (Units in 1RedPinkGreen R <gen> matching (((Matching unit) is in Chain) Equal to True))
      • Set BlockArea[3] = (Units in 1Red Top L <gen> matching (((Matching unit) is in Chain) Equal to True))
      • Set BlockArea[4] = (Units in 1Red Top Right <gen> matching (((Matching unit) is in Chain) Equal to True))
      • Set BlockArea[5] = (Units in 1Red Bot L <gen> matching (((Matching unit) is in Chain) Equal to True))
      • Set BlockArea[6] = (Units in 1Red Bot R <gen> matching (((Matching unit) is in Chain) Equal to True))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • ((Number of units in BlockArea[1]) Greater than or equal to 1) and ((Number of units in BlockArea[2]) Greater than or equal to 1)
              • ((Number of units in BlockArea[1]) Greater than or equal to 1) and ((Number of units in BlockArea[4]) Greater than or equal to 1)
              • ((Number of units in BlockArea[1]) Greater than or equal to 1) and ((Number of units in BlockArea[6]) Greater than or equal to 1)
              • ((Number of units in BlockArea[3]) Greater than or equal to 1) and ((Number of units in BlockArea[2]) Greater than or equal to 1)
              • ((Number of units in BlockArea[3]) Greater than or equal to 1) and ((Number of units in BlockArea[4]) Greater than or equal to 1)
              • ((Number of units in BlockArea[3]) Greater than or equal to 1) and ((Number of units in BlockArea[6]) Greater than or equal to 1)
              • ((Number of units in BlockArea[5]) Greater than or equal to 1) and ((Number of units in BlockArea[2]) Greater than or equal to 1)
              • ((Number of units in BlockArea[5]) Greater than or equal to 1) and ((Number of units in BlockArea[4]) Greater than or equal to 1)
              • ((Number of units in BlockArea[5]) Greater than or equal to 1) and ((Number of units in BlockArea[6]) Greater than or equal to 1)
        • Then - Actions
          • Custom script: call DestroyGroup (udg_BlockArea[1])
          • Custom script: call DestroyGroup (udg_BlockArea[2])
          • Custom script: call DestroyGroup (udg_BlockArea[3])
          • Custom script: call DestroyGroup (udg_BlockArea[4])
          • Custom script: call DestroyGroup (udg_BlockArea[5])
          • Custom script: call DestroyGroup (udg_BlockArea[6])
          • Player - Add (Point-value of (Triggering unit)) to (Owner of (Triggering unit)) Current gold
          • Unit - Remove (Triggering unit) from the game
        • Else - Actions
          • Custom script: call DestroyGroup (udg_BlockArea[1])
          • Custom script: call DestroyGroup (udg_BlockArea[2])
          • Custom script: call DestroyGroup (udg_BlockArea[3])
          • Custom script: call DestroyGroup (udg_BlockArea[4])
          • Custom script: call DestroyGroup (udg_BlockArea[5])
          • Custom script: call DestroyGroup (udg_BlockArea[6])


Ok, heres what happens: If i block wiith a single wall of towers it works perfectly. It gives back the right amount of gold for that tower. However, if i start the next wall in my maze an block with that wall of towers it give back way more then what it should :eek: . I think the problem maybe in the loop action in "Next" but im not too sure if it is or even how to fix it.

Please if you know what causes this and how to fix it, tell me an i will rep ya :)
O , and it only happens if i block back into the first wall of towers
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top