• 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] wtf is going on with this trigger...

Status
Not open for further replies.
Level 5
Joined
May 23, 2008
Messages
123
ok something realy odd is happening with this trigger and i cant find out why...

This part should end the trigger
  • If - Conditions
    • (Triggering unit) Not equal to canceledUnit
    • Then - Actions
      • Custom script: return
yet oddly this part still happens, and the unit the dies is not even in desort south P1 <gen> or desort south P2 <gen>

  • If - Conditions
    • ((desort south P1 <gen> contains (Triggering unit)) Equal to True) or ((desort south P2 <gen> contains (Triggering unit)) Equal to True)
    • Then - Actions
      • Set baseInZone[5] = (baseInZone[5] - 1)
      • For each (Integer B) from 1 to 12, do (Actions)
        • Loop - Actions
          • Multiboard - Set the text for multiBoard[(Integer B)] item in column 1, row 6 to (Desert South - + ((String(baseInZone[5])) + /2))
    • Else - Actions

full tigger

  • update Copy
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Wait 0.01 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Triggering unit) Not equal to canceledUnit
        • Then - Actions
          • Custom script: return
        • Else - Actions
      • For each (Integer A) from 1 to Integer2, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Triggering unit)) Equal to baseList[(Integer A)]
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((outlandwest P1 <gen> contains (Triggering unit)) Equal to True) or ((outlandwest P2 <gen> contains (Triggering unit)) Equal to True)
                • Then - Actions
                  • Set baseInZone[1] = (baseInZone[1] - 1)
                  • For each (Integer B) from 1 to 12, do (Actions)
                    • Loop - Actions
                      • Multiboard - Set the text for multiBoard[(Integer B)] item in column 1, row 2 to (Out Land West - + ((String(baseInZone[1])) + /3))
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((outlandeast P2 <gen> contains (Triggering unit)) Equal to True) or ((outlandeast P1 <gen> contains (Triggering unit)) Equal to True)
                • Then - Actions
                  • Set baseInZone[2] = (baseInZone[2] - 1)
                  • For each (Integer B) from 1 to 12, do (Actions)
                    • Loop - Actions
                      • Multiboard - Set the text for multiBoard[(Integer B)] item in column 1, row 3 to (Out Land East - + ((String(baseInZone[2])) + /3))
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((desort east p3 <gen> contains (Triggering unit)) Equal to True) or (((desort east p2 <gen> contains (Triggering unit)) Equal to True) or ((desort east P1 <gen> contains (Triggering unit)) Equal to True))
                • Then - Actions
                  • Set baseInZone[3] = (baseInZone[3] - 1)
                  • For each (Integer B) from 1 to 12, do (Actions)
                    • Loop - Actions
                      • Multiboard - Set the text for multiBoard[(Integer B)] item in column 1, row 4 to (Desert East - + ((String(baseInZone[3])) + /4))
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (((desort mid P1 <gen> contains (Triggering unit)) Equal to True) or ((desort mid P2 <gen> contains (Triggering unit)) Equal to True)) or (((desort mi P3 <gen> contains (Triggering unit)) Equal to True) or ((desort mid P4 <gen> contains (Triggering unit)) Equal to True))
                • Then - Actions
                  • Set baseInZone[4] = (baseInZone[4] - 1)
                  • For each (Integer B) from 1 to 12, do (Actions)
                    • Loop - Actions
                      • Multiboard - Set the text for multiBoard[(Integer B)] item in column 1, row 5 to (Desert Middle - + ((String(baseInZone[4])) + /3))
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((desort south P1 <gen> contains (Triggering unit)) Equal to True) or ((desort south P2 <gen> contains (Triggering unit)) Equal to True)
                • Then - Actions
                  • Set baseInZone[5] = (baseInZone[5] - 1)
                  • For each (Integer B) from 1 to 12, do (Actions)
                    • Loop - Actions
                      • Multiboard - Set the text for multiBoard[(Integer B)] item in column 1, row 6 to (Desert South - + ((String(baseInZone[5])) + /2))
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (elven fort P1 <gen> contains (Triggering unit)) Equal to True
                • Then - Actions
                  • Set baseInZone[6] = (baseInZone[6] - 1)
                  • For each (Integer B) from 1 to 12, do (Actions)
                    • Loop - Actions
                      • Multiboard - Set the text for multiBoard[(Integer B)] item in column 1, row 7 to (High Elves Hill - + ((String(baseInZone[6])) + /2))
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((possion forest P1 <gen> contains (Triggering unit)) Equal to True) or (((possion forest P3 <gen> contains (Triggering unit)) Equal to True) or ((possion forest P2 <gen> contains (Triggering unit)) Equal to True))
                • Then - Actions
                  • Set baseInZone[7] = (baseInZone[7] - 1)
                  • For each (Integer B) from 1 to 12, do (Actions)
                    • Loop - Actions
                      • Multiboard - Set the text for multiBoard[(Integer B)] item in column 1, row 8 to (Dark Forest - + ((String(baseInZone[7])) + /3))
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((((inner forest P6 <gen> contains (Triggering unit)) Equal to True) or ((inner forest P5 <gen> contains (Triggering unit)) Equal to True)) or (((inner forest P4 <gen> contains (Triggering unit)) Equal to True) or ((inner forest P2 <gen> contains (Triggering or (((inner forest P3 <gen> contains (Triggering unit)) Equal to True) or ((inner forest P1 <gen> contains (Triggering unit)) Equal to True))
                • Then - Actions
                  • Set baseInZone[8] = (baseInZone[8] - 1)
                  • For each (Integer B) from 1 to 12, do (Actions)
                    • Loop - Actions
                      • Multiboard - Set the text for multiBoard[(Integer B)] item in column 1, row 9 to (Inner Forest - + ((String(baseInZone[8])) + /3))
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((((outer forest P10 <gen> contains (Triggering unit)) Equal to True) or ((outer forest P9 <gen> contains (Triggering unit)) Equal to True)) or (((outer forest P8 <gen> contains (Triggering unit)) Equal to True) or ((outer forest P7 <gen> contains (Triggering or (((outer forest P5 <gen> contains (Triggering unit)) Equal to True) or (((outer forest P6 <gen> contains (Triggering unit)) Equal to True) or (((outer forest P4 <gen> contains (Triggering unit)) Equal to True) or (((outer forest P3 <gen> contains (Triggering
                • Then - Actions
                  • Set baseInZone[9] = (baseInZone[9] - 1)
                  • For each (Integer B) from 1 to 12, do (Actions)
                    • Loop - Actions
                      • Multiboard - Set the text for multiBoard[(Integer B)] item in column 1, row 10 to (Outer Forest - + ((String(baseInZone[9])) + /2))
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((hidden forest P2 <gen> contains (Triggering unit)) Equal to True) or ((hidden forest P1 <gen> contains (Triggering unit)) Equal to True)
                • Then - Actions
                  • Set baseInZone[10] = (baseInZone[10] - 1)
                  • For each (Integer B) from 1 to 12, do (Actions)
                    • Loop - Actions
                      • Multiboard - Set the text for (Last created multiboard) item in column 1, row 11 to (Hidden Forest - + ((String(baseInZone[10])) + /1))
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (((caves P3 <gen> contains (Triggering unit)) Equal to True) or ((caves P2 <gen> contains (Triggering unit)) Equal to True)) or ((cave P1 <gen> contains (Triggering unit)) Equal to True)
                • Then - Actions
                  • Set baseInZone[11] = (baseInZone[11] - 1)
                  • For each (Integer B) from 1 to 12, do (Actions)
                    • Loop - Actions
                      • Multiboard - Set the text for multiBoard[(Integer B)] item in column 1, row 12 to (Caves - + ((String(baseInZone[11])) + /3))
                • Else - Actions
              • Custom script: return
            • Else - Actions
 
Level 5
Joined
May 23, 2008
Messages
123
return is common in programming it simply ends the method when it is called.

The problem is the events are happening in the top part when the conditions are not true.
 
Level 5
Joined
May 23, 2008
Messages
123
if you convert some gui into jass you can see it uses return.

I also use it in many other triggers and it works fine.


edit

ok i found ot was what wrong the starting condition was checking if it was != when it needed 2 be =

also if you wait .001 secs the location of a dead unit = center of the map.
 
Last edited:
Status
Not open for further replies.
Top