Yeah, of course
I use an extra item (e.g. size) to follow the array size, for example:
Array
....size = 2
....0 = Value_0
....1 = Value_1
Then I can use: Array.size (It looks good ), for example:
No condition --------- Do = 0 to variable "counter"
Repeat (Array.size - 1) times:
........No condition --------- Do +1 to variable Array[VariableString(counter)]
........No condition --------- Do +1 to variable "counter"
It code will add 1 to every item in the array, without create new items accidentally. You just have to increase the size when add items.
To get modified arrays, my idea was copy the array values in another array, modifying its indices:
I made an example today:
[url]Besoin d'une équipe pour votre projet de jeu?]
It sorts a list by the value âPointsâ instead the default âABCâ of the name, as you can see, you can use any value from the array to sort it, and the functionality âHigh-to-Low value sortedâ can be easily modified in the condition âValue_of_an_item >= Value_of_the_other_itemsâ
I think itâs easier than sort the array by value⊠for example:
Item[0] ==> Item[Array.size - 1]
item[1] ==> Item[Array.size - 2]
âŠ
Item[Array.size - 1] ==> Item[Array.size -1 - (Array.size -1)] = 0
So:
No condition --------- Do = 0 to variable "counter"
Repeat (Array.size - 1) times:
........No condition --------- Do = Array[ToString(Variable(Array.size)-1-Variable(counter))] to variable CopyArray[VariableString(counter)]
........No condition --------- Do +1 to variable "counter"
Or something like that
Just have to define the initial value of a counter, and check final value, and your custom condition.
For example, I want to add 2 to every array item, from the third to the tenth items, two-by-two (index even numbers):
No condition --------- Do = 2 to variable "counter" #The second index is the third item (if you start naming from 0)
Repeat (10-2 = 8) times: #9th index (tenth value) included
........If Variable(counter) % 2 = 0 --------- Do + 2 to variable Array[VariableString(counter)]
........No condition --------- Do +1 to variable "counter"
Or donât check the Counter%2 = 0, but add +2 to the Counter in every iteration