What are arrays?

BramHoddssdBramHoddssd Member Posts: 414
edited November -1 in Working with GS (Mac)
everybodys talking about them. What are arrays?

Comments

  • SnowSnow Member Posts: 124
    It's a way of storing data like objects or values within a single variable.

    An example of how it could be used in GS:
    You have 20 instances of a single actor indexed (like a book index, each one has a designated number) in an array. If you want certain instances to do some action like for instance change a color in one scene and then other instances to do something else in the next scene - an array would allow you to quickly call them up and apply the changes.

    A visual representation of an array is like a table. Think of an excel sheet. That is basically an array. An array has 2 columns - one for the index and one for storing the values or objects. You have one object per row:
    One object has 1 index. So if you have 10 objects in an array - you have 10 rows.

    Arrays however have interesting attributes. You can split them up, reorder them, add or subtract things to and from them. If you're clever - you can use arrays for all kinds of things within a game. :)
  • JGary321JGary321 Member Posts: 1,246
    BramHoskin said:
    everybodys talking about them. What are arrays?

    Something we need very badly =)
  • JamesZeppelinJamesZeppelin Member Posts: 1,927
    It just seems like it would be so much faster to google some of this stuff rather than post a new topic and wait for the best answer.
  • MotherHooseMotherHoose Member Posts: 2,456
    JamesZeppelin said:
    It just seems like it would be so much faster to google some of this stuff rather than post a new topic and wait for the best answer.

    yes...but a search may give too much information and be more confusing... while a simpler explanation like @Snow gives is so much easier to understand and begin learning from.

    this thread almost duplicates what is in:

    http://gamesalad.com/forums/topic.php?id=12555

    MH
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
Sign In or Register to comment.