Arrays and random objects.
abdou0230
Member Posts: 4
Hi, I'm new to the Gamesalad world and I was wondering how to spawn a random actor, choose random color, or random text. I have some programming background and in programming there is something called an array, where you store multiple objects in it, then you can get a random object from it, add to it, remove from it, get it's length...etc, so I was wondering if there is something similar to that in Gamesalad.
Comments
Tables would be your closest bet, in my opinion more powerful than arrays because they are easier to visualize. Basically they are built in 2D arrays, but they are much more than that if you know how to use them. You can store a different object in each column and in each row define that objects properties. You can add and remove columns and rows and you can get its length from the built in functions tableColCount and tableRowCount. There are a ton of functions with tables, I suggest watching @Lost_Oasis_Games logic video about them