An action question

werasd

New Member
Reaction score
14
I have 1 year of World Editor and i Never, Never and Never understood the Action:
Code:
For each (Integer A) from 1 to 10, do (Actions)

I understand the "from 1 to 10" but i didnt understand the "(Integer A)"
What is Integer A and Integer B?
 
F

Fluxx

Guest
I have 1 year of World Editor and i Never, Never and Never understood the Action:
Code:
For each (Integer A) from 1 to 10, do (Actions)

I understand the "from 1 to 10" but i didnt understand the "(Integer A)"
What is Integer A and Integer B?

Integer A stands for the value of the integer in the loop. It is variable.

For example if you set up a code like this:

For each Integer[A] 1 to 10, create Integer[A] footman for player1

This would start by creating 1 footman, then 2 more, then 3 more, ect. until it reached 10. You would end up with a total of 55 footmen created.

Integer[A] (and integer for use in nested loops) is simply a way to refer to the point in the loop.
 

werasd

New Member
Reaction score
14
But it will make again the units? Like, when it reachs 10, it will restart and make the units again?

Another question, in your loop, it will create the second Integer A (2) after how much time?
 
C

Corkysmurf

Guest
But it will make again the units? Like, when it reachs 10, it will restart and make the units again?

Another question, in your loop, it will create the second Integer A (2) after how much time?

It only does the full loop once. If it was, for ANOTHER example, for a dialog choosing heroes with 5 buttons, it would be E: A dialog button was pressed. A: For Integer A- From 1 - 5 (5 buttons in it) Loop actions:
If: Button pressed equal to Integer A, create 1 Hero[Integer A] for player, else do nothing.
 

werasd

New Member
Reaction score
14
But how much time after the Integer A (1) completed the Integer A (2) is activated?
 
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