How to make lists | TUTORIAL | Difficulty: 🟨

As of right now (May 28, 2023) there is currently no built in way to make lists in gimkit creative. However, if we get creative, we can make our own lists.

The Idea:

You’ll notice when you place a get property block, the property name is just a text object. We can use this to our advantage, with the create text block. By creating multiple properties, each named item.0, item.1, item.2, we can make some text with the create text block that matches the property name of the item we’re trying to grab. If you’re confused by this, don’t worry, below is a step by step guide!
Example: Both of the set property blocks below set the same property, “test”

List storage and indexing

So lists are ordered, they have a first item, a second item, a third item, and so on. Our list will have three items. The position of an item in a list is called the “index” of the item. To store our list, we’ll place down three number properties, named like shown in the image below:

Now, place down a trigger. This is where we will write the code that accesses items from the list. Make a new “When Triggered” coding block, and go to the variables tab on the left and make a new variable named index. Set index to 2. Then get a set property block, and instead of choosing an existing property, drag out a create text block. In the create text block at the top, add “item.”, and at the bottom, convertNumberToText(index). It should look like this:

We just set the second item in the list! Notice how the create text object is joining together “item.” and “2”? This makes item.2, which is the second item in our list. If we set index to 1, now the create text object is joining together “item.” and “1”, making item.1, the first item in the list!

Now, let’s set the first item of the list to the second. If you want to try and figure this out on your own, you can pause here and do that. If you don’t though, here is the solution: Set the first item of the list like we did above, to get_property(create_text(“item.”, 2))

Conclusion

So that’s how you make a list in gimkit creative! In this tutorial, we learned how to get and set items in a list, along with how to set one up. If you saw any error in this tutorial, leave a comment and I will fix it as soon as possible. I hope you learned something from this! If you liked this tutorial, leave a like, it would be greatly appreciated!

Thanks for reading!
- Blackhole927
26 Likes

Amazing! I can’t believe I didn’t ever read this and that there are no replies.

11 Likes

I’m using basically a spreadsheet in GKC for Monopoly. It’s kind of like this, with multiple rows per space.

2 Likes

It should also be noted that lists can be very useful in say… a voting system :smiley:
I might make a voting system tutorial tbh

6 Likes

bumpers

3 Likes

wow, nice! bump. @Im_Pretty_Cool, would this help? I saw one of your post saying you needed to capture properties on a list or something.

3 Likes

How?

I did see this guide before, and it was helpful, just not for the exact purpose of my question.

2 Likes

Lists for name storage, lists for vote storage, etc

I don’t get it.

So you store player names in a list, and iterate through the list to show voting options. Votes are then stored in another list.

Oh Ok. I get it now. Implementing this would be a pain though.

I did implement it one time, wasn’t really that bad.

Isn’t this just a way to combine data?

This is concatenation lol

Concatenation.

I dont get this how does this work?? I’m kinda new to gimkit so this is confusing for me sorry

Ok i’ll check it out thanks!!

List of bumps:

  • bump
  • BUMP
  • Bump
  • bUmp
  • buMp
  • bumP
2 Likes
>>> ["B", "U", "M", "P"] 

>>> """I defidently didn't just realize this is the first use
...    of concatenation on the forums lol""".split(" ")
3 Likes