Need guidance on removing leaks from my triggers. I have read the post that talks about removing links, but I am having some general issues. I haven't taken the time to learn JASS yet. I have tons of triggers in my game that are like the one below, 14 that are just like it. But I don't know how to remove the point leaks from it most conservatively (keeping the trigger as small as possible). My specific problem is that I have lots of variables refering to regions, points, and units with an array and something like (playernumber of (Owner of (Triggering Unit))), and I don't know what to put in the custom scripts. Anyways, help with this trigger will likely give me some clues as to how to remove many of the others.
If you would like to tell me how to give +rep, I can do it.
Thanks for any help.
Trigger:
- Druid
- Events
- Unit - A unit enters (Playable map area)
- Conditions
- (Unit-type of (Triggering unit)) Equal to Druid (Night Elf Form)
- Actions
- Set ADruid[(Player number of (Owner of (Triggering unit)))] = (Triggering unit)
- Hero - Create Mana Shards and give it to (Triggering unit)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Number of units in (Units in UnitSlot1[(Player number of (Owner of (Triggering unit)))])) Equal to 0
- Then - Actions
- Unit - Move (Triggering unit) instantly to (Center of UnitSlot1[(Player number of (Owner of (Triggering unit)))])
- Unit - Create 1 Druid Sanctuary for (Owner of (Triggering unit)) at (Center of BuildSlot1[(Player number of (Owner of (Triggering unit)))]) facing Default building facing degrees
- Skip remaining actions
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Number of units in (Units in UnitSlot2[(Player number of (Owner of (Triggering unit)))])) Equal to 0
- Then - Actions
- Unit - Move (Triggering unit) instantly to (Center of UnitSlot2[(Player number of (Owner of (Triggering unit)))])
- Unit - Create 1 Druid Sanctuary for (Owner of (Triggering unit)) at (Center of BuildSlot2[(Player number of (Owner of (Triggering unit)))]) facing Default building facing degrees
- Skip remaining actions
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Number of units in (Units in UnitSlot3[(Player number of (Owner of (Triggering unit)))])) Equal to 0
- Then - Actions
- Unit - Move (Triggering unit) instantly to (Center of UnitSlot3[(Player number of (Owner of (Triggering unit)))])
- Unit - Create 1 Druid Sanctuary for (Owner of (Triggering unit)) at (Center of BuildSlot3[(Player number of (Owner of (Triggering unit)))]) facing Default building facing degrees
- Skip remaining actions
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Number of units in (Units in UnitSlot4[(Player number of (Owner of (Triggering unit)))])) Equal to 0
- Then - Actions
- Unit - Move (Triggering unit) instantly to (Center of UnitSlot4[(Player number of (Owner of (Triggering unit)))])
- Unit - Create 1 Druid Sanctuary for (Owner of (Triggering unit)) at (Center of BuildSlot4[(Player number of (Owner of (Triggering unit)))]) facing Default building facing degrees
- Skip remaining actions
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Number of units in (Units in UnitSlot5[(Player number of (Owner of (Triggering unit)))])) Equal to 0
- Then - Actions
- Unit - Move (Triggering unit) instantly to (Center of UnitSlot5[(Player number of (Owner of (Triggering unit)))])
- Unit - Create 1 Druid Sanctuary for (Owner of (Triggering unit)) at (Center of BuildSlot5[(Player number of (Owner of (Triggering unit)))]) facing Default building facing degrees
- Skip remaining actions
- Else - Actions
- If - Conditions
- Events
If you would like to tell me how to give +rep, I can do it.
Thanks for any help.