Help me PlZ

Status
Not open for further replies.
Level 14
Joined
Jan 5, 2009
Messages
1,126
I have a problem with my trigger.
It creates lightning effects and i added something to remove them but they don't get removed so more and more get created and the map starts to lag.
Heres my trigger, i had to add a wait to make sure i can see the lightning effects.
  • Black Hole
    • Events
      • Time - Every 0.34 seconds of game time
    • Conditions
      • (Number of living Dark orb of power units owned by Player 3 (Teal)) Greater than or equal to 1
    • Actions
      • Set Darkorbs = (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Dark orb of power))
      • Set BOSSHP = (Life of BOSS)
      • Set BlackholeNum = (Real(((Number of living Dark orb of power units owned by Player 3 (Teal)) x 4)))
      • Unit - Set life of BOSS to (BOSSHP + BlackholeNum)
      • Unit Group - Pick every unit in Darkorbs and do (Actions)
        • Loop - Actions
          • Set DarkOrbsLoc = (Position of (Picked unit))
          • Lightning - Create a Finger of Death lightning effect from source DarkOrbsLoc to target (Position of BOSS)
          • Set Life = (Last created lightning effect)
          • Custom script: call RemoveLocation( udg_DarkOrbsLoc )
          • Wait 0.05 seconds
          • Custom script: call DestroyLightning( udg_Life )
      • Custom script: call DestroyGroup( udg_Darkorbs )
 
Put the destroy trigger after each one, so you need 4 destroy triggers
Put the trigger into your loop if it's your loop that spawns the effect.
If lightning works the same as special effect, they should be gone after they are shown, you shouldn't have to wait.
 
Status
Not open for further replies.
Back
Top