How to do Loop - Actions?

cleeezzz

The Undead Ranger.
Reaction score
268
theres Integer A, B, Variable loops if thats what you mean

Ex:
Code:
For Integer A do 1-10 actions
   Loop Actions
       Create a unit
it will loop from 1-10 which will run the looped actions 10 times (creating 10 units)
Theres also loops for Groups (Unit Groups) (Player Groups)
ex
Code:
Pick every unit in (Playable Map Area)
    Loop Actions - 
        Kill (Picked Unit)
it will loop the actions for each picked unit meaning it will pick all the units in the map and then kill them.
 

tom_mai78101

The Helper Connoisseur / Ex-MineCraft Host
Staff member
Reaction score
1,733
To loop infinitely,

Do:

Code:
Set Number = 2
For Integer A do 1- (Number) actions
   Loop Actions
       Set Number = ((Number) + 1)
 

Romek

Super Moderator
Reaction score
964
You wouldn't really want to loop infinatly though.
You can use a periodic event if you want something like that.

You can also do

Code:
Custom Script: local integer a = 1
Custom Script: loop
Custom Script: exitwhen a > 9 << Number of loops.
[actions]
Custom Script: set a = a + 1
Custom Script: endloop

Use that if you find IntegerA and IntegerB are over-writing eachother (Or you can do that with a global variable)

GUI:
Code:
For each (Integer [Integer Variable]) from 1 to 10, do (Actions)
    Loop - Actions
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top