Is this trigger leaky?

Igor_Z

You can change this now in User CP.
Reaction score
61
Trigger:
  • Timer move
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Set BSLightning_Points[1] = (Position of BSLightning_Units[1])
      • Set BSLightning_Points[2] = (Position of BSLightning_Units[2])
      • Set BSLightning_Points[3] = (BSLightning_Points[1] offset by 40.00 towards (Angle from BSLightning_Points[1] to BSLightning_Points[2]) degrees)
      • Unit - Turn collision for BSLightning_Units[1] Off
      • Unit - Move BSLightning_Units[1] instantly to BSLightning_Points[3]
      • Destructible - Pick every destructible within 175.00 of BSLightning_Points[1] and do (Actions)
        • Loop - Actions
          • Destructible - Kill (Picked destructible)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Distance between BSLightning_Points[1] and BSLightning_Points[2]) Less than or equal to 50.00
        • Then - Actions
          • Unit - Cause BSLightning_Units[1] to damage BSLightning_Units[2], dealing (25.00 + (25.00 x (Real((Level of Blink Lightning for BSLightning_Units[1]))))) damage of attack type Chaos and damage type Universal
          • Unit - Order BSLightning_Units[1] to Attack BSLightning_Units[2]
          • Unit - Turn collision for BSLightning_Units[1] On
          • Custom script: call RemoveLocation(udg_BSLightning_Points[1])
          • Custom script: call RemoveLocation(udg_BSLightning_Points[2])
          • Custom script: call RemoveLocation(udg_BSLightning_Points[3])
          • Trigger - Turn off (This trigger)
        • Else - Actions
 

Igor_Z

You can change this now in User CP.
Reaction score
61
Nah, if i put it outside the trigger isn't doing what it suppose to :)
 

Igor_Z

You can change this now in User CP.
Reaction score
61
Yy, i figured that myself... So if i put the outside my trigger doesn't work, if i put them inside the loop it leaks. What to do??
 

Tom_Kazansky

--- wraith it ! ---
Reaction score
157
>if i put the outside my trigger doesn't work, if i put them inside the loop it leaks

weird... so, if you put it outside, where did you put them ?

Trigger:
  • Timer move
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Set BSLightning_Points[1] = (Position of BSLightning_Units[1])
      • Set BSLightning_Points[2] = (Position of BSLightning_Units[2])
      • Set BSLightning_Points[3] = (BSLightning_Points[1] offset by 40.00 towards (Angle from BSLightning_Points[1] to BSLightning_Points[2]) degrees)
      • Unit - Turn collision for BSLightning_Units[1] Off
      • Unit - Move BSLightning_Units[1] instantly to BSLightning_Points[3]
      • Destructible - Pick every destructible within 175.00 of BSLightning_Points[1] and do (Actions)
        • Loop - Actions
          • Destructible - Kill (Picked destructible)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Distance between BSLightning_Points[1] and BSLightning_Points[2]) Less than or equal to 50.00
        • Then - Actions
          • Unit - Cause BSLightning_Units[1] to damage BSLightning_Units[2], dealing (25.00 + (25.00 x (Real((Level of Blink Lightning for BSLightning_Units[1]))))) damage of attack type Chaos and damage type Universal
          • Unit - Order BSLightning_Units[1] to Attack BSLightning_Units[2]
          • Unit - Turn collision for BSLightning_Units[1] On
          • Trigger - Turn off (This trigger)
        • Else - Actions
      • Custom script: call RemoveLocation(udg_BSLightning_Points[1])
      • Custom script: call RemoveLocation(udg_BSLightning_Points[2])
      • Custom script: call RemoveLocation(udg_BSLightning_Points[3])
 

Igor_Z

You can change this now in User CP.
Reaction score
61
It doesn't move my unit cuz the BS_Lightning_Points[1,2,3] r deleted...
 

Igor_Z

You can change this now in User CP.
Reaction score
61
Can some 1 tell me how to fix this leak and get the spell doing what it suppose to?
 

Kikac_NNGK

Well-Known Member
Reaction score
33
Doesn't move your unit because you have Turned the Trigger Off.

Trigger:
  • (Distance between BSLightning_Points[1] and BSLightning_Points[2]) Less than or equal to 50.00

He turns off the trigger when that condition is found. When the distance between the BSLightning_Points[1] and BSLightning_Points[2]) Less than or equal to 50.00 then he turns off the trigger
 

Tyrulan

Ultra Cool Member
Reaction score
37
> When the distance between the BSLightning_Points[1] and BSLightning_Points[2]) Less than or equal to 50.00 then he turns off the trigger

These conditions are true when he initializes the variables.

Show me the trigger where you declare the Unit array please.
 

Igor_Z

You can change this now in User CP.
Reaction score
61
Guys plz help me how to solve this... I have 4-5 triggers in my map that i have same problems :(... If i remove points outside the if/then/else those triggers don't work. Help me plz!!!
 

Sajberhippie

New Member
Reaction score
30
That's weird, it shouldn't affect it negatively in any way. The if/then/else is activated before the point removal. But do you have some other trigger that turns the trigger on? Because otherwise that could be the problem.
 

Igor_Z

You can change this now in User CP.
Reaction score
61
Yeah, other trigger turns the trigger i should u on... When my hero casts my spell the trigger i should u up is turned to on
 
General chit-chat
Help Users

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top