Loop inside another loop

monoVertex

I'm back!
Reaction score
460
Okay, I'm trying to make an fire effect(I don't know how to call it, sorry :eek: ). Here's the code:

Code:
 local unit cast = GetTriggerUnit()
 local real x = GetUnitX(cast)
 local real y = GetUnitY(cast)
 local unit var1
 local real m = 0
 local real a = 50.00
 local real b  = 90.00

  loop
    set a = a+b
    exitwhen a == 290.00

    loop
      exitwhen m == 360.00
      set var1 = CreateUnitAtLoc(GetOwningPlayer(cast), 'h004', PolarProjectionBJ(Location(x, y), a, m), m)
      call UnitApplyTimedLife(var1, 'BTLF', 4.00)
      set m = m+30.00
    endloop

    set b = b-10.00
  endloop

But it simply doesn't works... it creates only the first circle... Thanks in advance.
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> exitwhen m == 360.00

Once it's 360, that's it.

Now, maybe, if you're really lucky, it helps to set m to 0 just before the loop it's used in.. :p
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top