List Commands
A list can store multiple values like numbers or texts also called "list-entries"
At the beginning, each list has 0 values. You can add/remove as much values as you like using the corresponding list commands.
You can imagine a list like on a sheet of paper:
1. Apple
2. Banana
3. Orange
4. Pinapple
5. Chocolate
Thats a list with 5 entries like for shopping. Each list-entry has a unique position like "Banana" is at position "2".
It is exactly the same like with lists in VN Maker. The only difference is that a list in VN Maker always starts with "0" as the first position instead of "1". Our above list in VN Maker would look like this:
0. Apple
1. Banana
2. Orange
3. Pinapple
4. Chocolate
A list is dynamic, same like on a sheet of paper, we can add new entries to our list or remove existing ones any time. If we remove a list-entry on a sheet of paper, we would probably just strikethrough the list-entry but in VN Maker the list-entry really gets completely removed and the position of all list-entries gets corrected. So if we take a look at our list above, if we remove the "Orange" entry the list would look like this:
0. Apple
1. Banana
2. Pinapple
3. Chocolate
As we can see, "Pinapple" is no longer at position "3" but at "2" now.
In VN Maker, we can add 4 different kind of values to a list: Numbers, Texts, Switches and even other Lists. For example: Our list above only contains text-values. Like already mentioned before, a list can also contain another list which is also called "Nested Lists" which would look like this on a sheet of paper:
0. Fruits
0. Apple
1. Banana
2. Orange
1. Sweets
0. Chocolate
1. Cake
However, nested lists are an advanced topic. To see lists in action, check out the "List Example".
Appends a new value to the list.
List - The list variable to append the value to.
Value - The value to append.
Number means it’s a number-value.
Text means it’s a text-value.
Switch means it’s a switch-value.
List means it’s another list.
Inserts a new value at the specified index of the selected list.
List - The list variable to insert the value into.
Index - The position at which the value should be inserted.
Value - The value to insert.
Number means it’s a number-value.
Text means it’s a text-value.
Switch means it’s a switch-value.
List means it’s another list.
Removes the value at the specified position from the list.
List - The list variable to remove the value from.
Index - The position of the value to remove.
Removes the value at the end of the selected list and stores it into the specified variable.
List - The list variable to remove the last value from.
Value - The type of the removed value.
Number means it’s a number-value.
Text means it’s a text-value.
Switch means it’s a switch-value.
List means it’s another list.
Store in - The variable to stored the removed value in.
Removes the first value of the selected list and stores it in the specified variable.
List - The list variable to remove the first value from.
Value - The type of the removed value.
Number means it’s a number-value.
Text means it’s a text-value.
Switch means it’s a switch-value.
List means it’s another list.
Store in - The variable to store the removed value in.
Gets the value at the specified position from the selected list and stores it in the specified variable.
List - The list variable to remove get value from.
Index - The position of the value to get.
Value - The type of the removed value.
Number means it’s a number-value.
Text means it’s a text-value.
Switch means it’s a switch-value.
List means it’s another list.
Store in - The variable to stored the removed value in.
Searches the selected list for the specified value. The search is flat, means it will not search in nested lists.
List - The list variable to search.
Value - The value to search for.
Number means it’s a number-value.
Text means it’s a text-value.
Switch means it’s a switch-value.
List means it’s another list.
Store Index in - The number-variable to store the position of the first occurrence of the specified value in. The position is -1 if the value cannot be found in the list.
Sets the value of the list at the specified position. It doesn’t add a new value to the list, it just sets the value at the specified position.
It can be compared like if we erase a list-entry with a rubber and then write something different at that position.
If the length of the list is smaller then the specified position, like if the position is 5 but the list only haas 3 entries, the list is automatically expanded to reach the correct length.
List - The list variable to set a value for.
Index - The position of the value to set.
Value - The value to set.
Number means it’s a number-value.
Text means it’s a text-value.
Switch means it’s a switch-value.
List means it’s another list.
Shuffles the list like if you have a list of cards you can use this command to shuffle the cards.
List -The list variable to shuffle.
Sorts the specified list like if you have a list of names you can use this command to sort the names ascending or descending.
List - The list variable to sort.
Order - The sort order.
Ascending sorts in ascending order like: "Apple”, "Banana”, "Orange”, "Pinapple”
Descending sorts in descending order like: "Pinapple”, "Orange”, "Banana”, "Apple”
Removes all elements from the specified list. After that command has been executed, the specified list is empty.
List - The list variable to clear.
Gets the current length of the selected list and stores it into the selected number variable.
List - The list variable to get the length for.
Store in - The number variable to store the length in.
Copies the list and pastes it into another list.
It can be compared like if you have one list on one paper and then grab a new paper and write the exactly the same list-entries on it.
In the end you have two independent lists: The original and the copy.
List - The list variable to copy
Target List - The list variable to paste the copied list in.
Converts a list into a Text by appending all list entries together using a specified separator character.
List - The list variable to join.
Store in - The text variable to store in the joined list entries.
Separator - An optional character put in-between the list entries.
Converts a Text into a List by splitting the text at a specified character such as a comma, semicolon, etc.
Text - The text variable to convert into a list.
Store in - The list variable to store in the list entries.
Separator - A character at which the text should be splitted into single entries.