Property Lists 101

I think I’m due for another guide.


Introduction

What is a list?

A list [1] in coding is like a shopping list, but it allows you to store or organize groups of data.

While I was creating this guide, April Fool’s hit. Eating tiny slim is explicitly forbidden. [2]


Anyyyway

There is a specific way to organize your list, and the reasons for this ultimately come down to what blocks are available in Gimkit Creative. This is an example of how your list will be set up.

01notyoyo01, 02kosmo02, 03foxy03, 04bird04, 05shadow05,

Each item has an identifier in its position on the list. If you want to grab item 1, then find the first occurrence and last occurrence of 01, and fish the characters in between.


What if the items have numbers? Will 01 in “building” mess it up? 01gimkit01, 02bu01ing02

If in some insane scenario where you have numbers like that in the property, swap the identifier to include a special character. Here would be an updated version.

%01notyoyo%01, %02kosmo%02, %03foxy%03, %04bird%04, %05shadow%05,

Now, the code looks for %01 instead of only numbers.


Real Coding

The snippet above is a real coding example from me randomly generating a company name. I have two properties:

companyNames1 - 1Antibrainrot Inc.1, 2Binary Bits2, 3Gummy Bear LLC3, 4Melted Gouda Corps4, 5GimKorporation5, 6DayOne Co.6, 7Silly Corps7, 8Autonomous Movie Theaters8, 9Disaster LLC9

companyNames2 - 1usedcars.com1, 2Unknown Inc.2, 3Not a Secret Society3, 4Nonsensical Nominations4, 5Archadoncus Arrows5, 6Yapping Inc.6, 7The Factory Factory7, 8Peanutopolis8, 9Product Productions9

Each property holds 9 names, with numbers surrounding them. Variable g (group) chooses which property to grab the name from, and variable x chooses which slot 1-9 it picks.

You got that down?

Next, it sets companyName to the randomly picked name. Since the two properties [3] only have the number different, we set g to the whole property name. We used g to specify which property we are gathering from.

Finally, it grabs the first occurrence and last occurrence of the random number from x. Those two things allow the substring block to identify where to get the substring from.

If you are confused, peek at the properties I used again, and specifically look at the numbers.

Additional Information

The +1 and -1 make sure it only grabs the substring we want. If it isn’t there, then the substring would be 6Yapping Inc.6 instead of Yapping Inc.


OTHER THINGS YOU CAN DO

You can add and remove from the list too! Create a substring where the blue text is and the red text is, then combine them to remove the unwanted section in yellow! Adding should be self-explanatory.

image


Please feel free to ask questions, I don’t bite!


  1. also known as arrays or sequences ↩︎

  2. procastination left this guide unfinished for months :expressionless_face: ↩︎

  3. companyNames1 and companyNames2 ↩︎

9 Likes

Ok…
So basically I can store arrays in property’s, and extract them via index using this guide, right?

Ok bet now I can make infinite death messages :smiling_face_with_horns:

1 Like

yes

2 Likes

Very sigma. This is a very well thought guide, is this because the last guide on lists lost it’s image?

Poor foxy. Bro’s actually giving us homework :skull:

4 Likes

Leader BUMP!

2 Likes