Change different game attributes from the same button
dinorepair
Member Posts: 22
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...
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
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