looping and adding to group

Pahl

New Member
Reaction score
7
When i add units to a local group called TempGroup inside a loop like this:

Code:
    local group TempGroup
    local integer i

    set i = 1
    loop
      exitwhen i > 32
      if ( true ) then
        call DisplayTextToForce(GetPlayersAll(),"Before AddGroup")
        call GroupAddUnit(TempGroup, udg_UnitArray[i])
        call DisplayTextToForce(GetPlayersAll(),"Wont get here")
      endif
      set i=i+1
    endloop
The code seems to stop at "call GroupAddUnit", the first message is displayed once, and the secound is never displayed.
Am i missing something or what? Shouldent this work, or is there a reason you can't add units in a loop like this?

(the if(true) is just so I know thats not whats wrong)
 
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