Connecting boxes, multiple menus, grids, switch locations

kkchongkkchong Member Posts: 60
edited May 2012 in Working with GS (Mac)
hi, when i work on projects which invloves the above, i notice that i have to always create
the following:
1. three game attributes, integer for selected number, real for selected x, and real for selected y.
and
2. three actor attributes , integer for my number, real for distance, and boolean for used ( this is easier to understand )
Can anyone explain the purpose for doing all these

KK

Comments

  • simo103simo103 Member, PRO Posts: 1,331
    @kkchong .. hope this answers your question ... Game attributes are for values that may need to be referenced by any actor in your App. So for example your Game.SelectedNumber might hold the active number of the selected Actor. Self (or Actor Attributes) are defined on teh actor and are specific to that actor and accessed only (generally) by that actor. So for example in a room full of people, each person would have a self.Name. self.john wouldn't know there was a self.bob in the room. If you selected one, the Game.Name would take the value of that self.Name. And thus if it became Game.Bob then every actor could see (use) that value. So self.john could say if Game.name is Bob then go to the corner etc. hope that helps....
  • kkchongkkchong Member Posts: 60
    @simo103 thank you so much for explaining. i understand now. but i think i need to work specifically on projects a few more times to get the real feel of all the attributes better.
    smiles
    kk
Sign In or Register to comment.