Help again with actors and switches, im becoming crazzy O_ö

CodeCodeCodeCode Member Posts: 200
edited November -1 in Working with GS (Mac)
Hi

so my problem is...
i want to have an actor that display two different texts (text1 and text2)

When you touch inside the first time it should display Text1 and change the attribute game.inventory to game.invetory+1. then when i touch anywhere (not only inside of the actor) it should remove Text 1.
Now every time when i click inside of the actor it should display Text2 and after that when i click somewhere (not only inside of the actor) the text should be remove.

I tried to do it creating a new attribute and using the module %2 to create a switch but it doesn't work.

Please need help i spend hours and hours trying to brig it to work but without success please help

Comments

  • dotsonj23dotsonj23 Member Posts: 316
    You can't do it now with 0.9.0. They fixed a bug that inadvertently allowed you to do it. Now you have to fake it. You need two buttons (one will not work for a switch). One for Text 1 and 1 for Text 2. But only one visible at a time (i.e. change alpha attribute under color attribute based on rules for the two depending on when you want them to show). Plus you will then need to have the actors switch locations each time the current one is pressed. Keep the non-visible button somewhere on the screen that won't require a touch behavior for another actor and you will be fine. The two button actors should never actually overlap as that will cause you problems. I just modified two of my games to make this work in the new 0.9.0 gs. Good luck.
Sign In or Register to comment.