Stopping Loops

2evil

New Member
Reaction score
16
To stop a loop in GUI, could you use the loop variable function and just set the variable to above one end of the loop? For example:

Code:
For each (Integer Temp_value) from (1 + (200 + ((Team number of (Triggering player)) - 1))) to (200 + (200 x ((Team number of (Triggering player)) - 1))), do (Actions)
    Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Item-type of (Sold Item)) Equal to Pawn_Shop_Items[Temp_value]
            Then - Actions
            Else - Actions
                 Set Temp_value=1000
 

corvusHaunt

New Member
Reaction score
96
You have it right.
As long as you set it to a value higher than your loop max (min to max), then it will exit the loop. You could also do it without a variable:

Code:
For each (Integer A) from 1 to 10, do (Actions)
    Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
              KeepGoing = false
            Then - Actions
              Custom Script: set bj_forLoopAIndex = 100000 //or bj_forLoopBIndex for an integer B loop
            Else - Actions
 

Luth

Lex Luthor!
Reaction score
41
... or, also to exit the loop immidiately:
Code:
Custom Script:  exitwhen true
 
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