- Joined
- May 2, 2014
- Messages
- 28
Hey guys.
I am working on a trigger that casts bloodlust when a unit enters a region. The problem is, there are about 50 regions and each region can only be used once. To solve THAT problem, I have the trigger turn itself off, but that stops me from being able to just combine all the triggers in one. I was wondering if there was any way to optimize this trigger in GUI (or Jass, if need be).
Also, I am new to triggers and if you could just tell me if I removed all leaks properly, or missed something, that'd be great!
I am working on a trigger that casts bloodlust when a unit enters a region. The problem is, there are about 50 regions and each region can only be used once. To solve THAT problem, I have the trigger turn itself off, but that stops me from being able to just combine all the triggers in one. I was wondering if there was any way to optimize this trigger in GUI (or Jass, if need be).
Also, I am new to triggers and if you could just tell me if I removed all leaks properly, or missed something, that'd be great!
-
LVL 01 BLOOD 1
-

Events
-


Unit - A unit enters LVL 01 BLOOD 1 <gen>
-
-

Conditions
-


(Unit-type of (Triggering unit)) Equal to Dead Girl
-
-

Actions
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




((Triggering unit) has buff Period Blood LVL 1) Equal to True
-
-



Then - Actions
-




Set TempLocation[1] = (Position of (Entering unit))
-




Unit - Create 1 Dummy Unit for Neutral Passive at TempLocation[1] facing Default building facing degrees
-




Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
-




Unit - Add Period Blood LVL 2 to (Last created unit)
-




Unit - Order (Last created unit) to Orc Shaman - Bloodlust (Entering unit)
-




Custom script: call RemoveLocation (udg_TempLocation[1])
-




Trigger - Turn off (This trigger)
-
-



Else - Actions
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






((Triggering unit) has buff Period Blood LVL 2) Equal to True
-
-





Then - Actions
-






Set TempLocation[1] = (Position of (Entering unit))
-






Unit - Create 1 Dummy Unit for Neutral Passive at TempLocation[1] facing Default building facing degrees
-






Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
-






Unit - Add Period Blood LVL 3 to (Last created unit)
-






Unit - Order (Last created unit) to Orc Shaman - Bloodlust (Entering unit)
-






Custom script: call RemoveLocation (udg_TempLocation[1])
-






Trigger - Turn off (This trigger)
-
-





Else - Actions
-






If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-







If - Conditions
-








((Triggering unit) has buff Period Blood LVL 3) Equal to True
-
-







Then - Actions
-








Set TempLocation[1] = (Position of (Entering unit))
-








Unit - Create 1 Dummy Unit for Neutral Passive at TempLocation[1] facing Default building facing degrees
-








Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
-








Unit - Add Period Blood LVL 4 to (Last created unit)
-








Unit - Order (Last created unit) to Orc Shaman - Bloodlust (Entering unit)
-








Custom script: call RemoveLocation (udg_TempLocation[1])
-








Trigger - Turn off (This trigger)
-
-







Else - Actions
-








If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-









If - Conditions
-










((Triggering unit) has buff Period Blood LVL 4) Equal to True
-
-









Then - Actions
-










Set TempLocation[1] = (Position of (Entering unit))
-










Unit - Create 1 Dummy Unit for Neutral Passive at TempLocation[1] facing Default building facing degrees
-










Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
-










Unit - Add Period Blood LVL 5 to (Last created unit)
-










Unit - Order (Last created unit) to Orc Shaman - Bloodlust (Entering unit)
-










Custom script: call RemoveLocation (udg_TempLocation[1])
-










Trigger - Turn off (This trigger)
-
-









Else - Actions
-










If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-











If - Conditions
-












((Triggering unit) has buff Period Blood LVL 5) Equal to True
-
-











Then - Actions
-












Set TempLocation[1] = (Position of (Entering unit))
-












Unit - Create 1 Dummy Unit for Neutral Passive at TempLocation[1] facing Default building facing degrees
-












Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
-












Unit - Add Period Blood LVL 6 to (Last created unit)
-












Unit - Order (Last created unit) to Orc Shaman - Bloodlust (Entering unit)
-












Custom script: call RemoveLocation (udg_TempLocation[1])
-












Trigger - Turn off (This trigger)
-
-











Else - Actions
-












If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-













If - Conditions
-














((Triggering unit) has buff Period Blood LVL 6) Equal to True
-
-













Then - Actions
-














Set TempLocation[1] = (Position of (Entering unit))
-














Unit - Create 1 Dummy Unit for Neutral Passive at TempLocation[1] facing Default building facing degrees
-














Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
-














Unit - Add Period Blood LVL 7 to (Last created unit)
-














Unit - Order (Last created unit) to Orc Shaman - Bloodlust (Entering unit)
-














Custom script: call RemoveLocation (udg_TempLocation[1])
-














Trigger - Turn off (This trigger)
-
-













Else - Actions
-














If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-















If - Conditions
-
















((Triggering unit) has buff Period Blood LVL 7) Equal to True
-
-















Then - Actions
-
















Set TempLocation[1] = (Position of (Entering unit))
-
















Unit - Create 1 Dummy Unit for Neutral Passive at TempLocation[1] facing Default building facing degrees
-
















Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
-
















Unit - Add Period Blood LVL 8 to (Last created unit)
-
















Unit - Order (Last created unit) to Orc Shaman - Bloodlust (Entering unit)
-
















Custom script: call RemoveLocation (udg_TempLocation[1])
-
















Trigger - Turn off (This trigger)
-
-















Else - Actions
-
















If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-

















If - Conditions
-


















((Triggering unit) has buff Period Blood LVL 8) Equal to True
-
-

















Then - Actions
-


















Set TempLocation[1] = (Position of (Entering unit))
-


















Unit - Create 1 Dummy Unit for Neutral Passive at TempLocation[1] facing Default building facing degrees
-


















Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
-


















Unit - Add Period Blood LVL 9 to (Last created unit)
-


















Unit - Order (Last created unit) to Orc Shaman - Bloodlust (Entering unit)
-


















Custom script: call RemoveLocation (udg_TempLocation[1])
-


















Trigger - Turn off (This trigger)
-
-

















Else - Actions
-


















If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



















If - Conditions
-




















((Triggering unit) has buff Period Blood LVL 9) Equal to True
-
-



















Then - Actions
-




















Set TempLocation[1] = (Position of (Entering unit))
-




















Unit - Create 1 Dummy Unit for Neutral Passive at TempLocation[1] facing Default building facing degrees
-




















Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
-




















Unit - Add Period Blood LVL 10 to (Last created unit)
-




















Unit - Order (Last created unit) to Orc Shaman - Bloodlust (Entering unit)
-




















Custom script: call RemoveLocation (udg_TempLocation[1])
-




















Trigger - Turn off (This trigger)
-
-



















Else - Actions
-




















If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





















If - Conditions
-






















((Triggering unit) has buff Period Blood LVL 10) Equal to True
-
-





















Then - Actions
-






















Trigger - Turn off (This trigger)
-
-





















Else - Actions
-






















Set TempLocation[1] = (Position of (Entering unit))
-






















Unit - Create 1 Dummy Unit for Neutral Passive at TempLocation[1] facing Default building facing degrees
-






















Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
-






















Unit - Add Period Blood LVL 1 to (Last created unit)
-






















Unit - Order (Last created unit) to Orc Shaman - Bloodlust (Entering unit)
-






















Custom script: call RemoveLocation (udg_TempLocation[1])
-






















Trigger - Turn off (This trigger)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-





