Change different game attributes from the same button

dinorepairdinorepair Member Posts: 22
edited November -1 in Working with GS (Mac)
Hi devs,
I need your help. I have an app with more than 90 scenes. I have a boolean game attribute related to every scene, like game.1, game.2, game.3, etc. etc. In every scene I have an invisible actor that spawn a different button based on the value of the related game attribute. When I push one of this button I change the value of the related game attribute like:

- when touch change game.1 to true.

I can't figure out how I can do that for every scene, because game.1 will be game.2, game.3, game.4 etc etc. but I can't assign this number to the button, because It is spawned as a prototype from another actor in every scene

Any suggestion? Thanks...

Comments

  • MotherHooseMotherHoose Member Posts: 2,456
    depends on how many buttons you need. 90? or 10?
    are they all in same location in scenes?

    you could just use a blank button and change image with each scene...
    as well as the actions of the button.

    buttonActor
    [Rule] if game.2
    -- (change the X,Y and W,H if you need to )
    --[Change Image] select 2.png
    --[Rule] if touch is pressed
    ----the behavior you want

    MH
Sign In or Register to comment.