(Array issue) I want to use array to control my variables

matt72228matt72228 Member Posts: 4
edited April 2012 in Working with GS (Mac)
Is there any way to implement array variables?
Thanks a lot : )

Best Answer

  • theCodeMonsterstheCodeMonsters Posts: 359
    Accepted Answer
    A table but it's a immutable object. Meaning you can't change it once you've made it. GS is working on adding read and write functions to Tables. These will be arrays. But for now, we have Immutable arrays.

Answers

  • greengluegreenglue PRO Posts: 52
    Maybe by using a table and calling it from within your actor(s)?
  • youngster9youngster9 Member Posts: 326
    @matt7228

    You are having a lot of issues ;)
  • matt72228matt72228 Member Posts: 4
    Thanks a lot : )
  • MotherHooseMotherHoose Member Posts: 2,456

    an array is simply an arrangement of data

    an Index is a 1 column array
    a list is a a 1 column array
    a spriteSheet is a one or more column(s) array (immutable)
    a table is a one or more column(s) array
    a database is an array with/without complex data arrangements (a table or multiple tables)

    attributes are variables (as their values can be varied and various … and are mutable)
    attributes store values … as variables and parameters do in other programming languages

    in GS to access/implement/manipulate/change data in an arrangement of data, use game/scene/actor attributes or tableCellValues … but, data in a read-only table (and spriteSheets) array is not mutable.

    in GS attributes can be implemented, manipulated, and changed … within their parameters and if their delimitation is not fixed.

    in GS the terms: arrays; variables; conditionalStatements; parameters, etc. … are not relevant
    but, the functionality of those terms … is in GS

    in GS using: Attributes, Rules and their Otherwise; Behaviors … greatly speeds up the coding process … while still allowing great flexibility.

    IMO … @matt72228 … learning the language of the environment you are working in … is easier than trying to apply the terminology of other languages to that environment.
    I empathize with you … I too had a hard time trying to translate terms (and, my programming started with BASIC … and through many other languages after that.)

    image MH
Sign In or Register to comment.