1

Data (15/15)

1. [Variable]

  • Variable is a changing value, and "variable" block can get the value of the preset variable.

Default style:

Other styles:

  • For example:

You can create a variable "time". Then the value of "time" can be get by "variable" block.

2. set variable [?] to (0)

  • Set the variable to input value.

3. [increase] variable [?] by (1)

  • Change the variable by input amount.

4. [show] variable [?]

  • In order to clean the stage, you can [show/hide] a variable at a certain time or scene when the game is running.

Or you can set whether the variable is shown at the beginning.

5. [List]

  • A list is a container that holds many variables. You can store or get the value of each variable in the list.

It is like a cupboard with many drawers. Every drawer contains objects.

  • How to create a list

In the block boxes, you can use list-related script blocks, to add or delete drawers, or to replace the contents in the drawers, etc.

6. append (0) to the last of (List)

  • Add the input item to the end of the list.

  • Please note:

In most programming languages, the number of items in a list generally starts at 0;

But for easier understanding, the number of items in a list generally starts at 1 in Kitten Editor.

7. insert (0) at (List) No. (1)

  • Insert input value at the specified position in the list.

8. delete (List) [No.] (1) index

  • Delete the item at any or the last position from a list.

9. replace (List) [No.] (1) with (0)

  • Replace an item at any or the last position in the list with the input value.

10. copy (List) to (List)

  • Copy all items from a list to another one.

11. (List) [No.] (1) index

  • Get the item at any or the last position in the list.

12. length of (List)

  • Get the length of the list.

* The length of the list is the number of items in the list.

13. index of (0) in (List)

  • Report the specified item's position in the list.

  • If the item is not in the list, retern value "0".

  • For example:

Figure 1: get the position of value "2" in list "Codemao". The return value is "2".

Figure 2: get the position of "a" in list "Codemao". Because "a" in not in the list, return value "0".

14. if (List) contains (0)

  • It is a Boolean type block.

  • Report true if the list contains the input item.

15. [show] [List]

  • Show or hide the list on the stage.