Activate actor changing attribute

mrtopzmrtopz Member Posts: 28
edited November -1 in Working with GS (Mac)
Hi!

I'm trying to activate an actor after changing it's attribute to change the scene only after being touched and the "ActivateButton" attribute is true but it's not working. It changes the scene at any time I press the actor.

Lemme try to explain:

1- I created a boolean attribute called "ActivateButton"
2- Inside an actor that displays a fading in and out image I've put a change attribute behavior. It changes the "ActivateButton" to true after being touched
3- On screen I've put an actor to act like a button following these rules: when receive a touch and "ActivateButton" is true, Change Scene.

The problem is that it doesn't work, only do it's job if I set the rule to "ActivateButton" = false that's inside the "actor button".

By the way they are inside the same scene.
Another thing: what's the use of the tick button on attribute editor?

Thanks!

Comments

  • specialist_3specialist_3 Member Posts: 121
    I somehow find the boolean (true,false) attributes dodgy. I hate using them. What I do is create an integer variable which I set 1 for true and 0 for false. It works great.

    The tick button basically just means, ticked to activate, de-click to deactivate. Example, if you go to Physics in your attributes menu, it has a tickbox beside Movable. If u tick it, the actor is movable and is subject to all newtonian and star wars laws. Uncheck it, actor cannot move even if a nuclear missile hits it.
  • mrtopzmrtopz Member Posts: 28
    So the tick in attributes is to set it "always true", right?
    I tried using integer too, but with same results...

    I know that if I change scene when I touch the screen works perfectly but it's a bit ugly and unelegant to have a loading between "touch to play" and "choose 1 player or 2 players". They are on the same background and I don't believe that it's really necessary.

    To me looks like the "Change Scene" behavior works unrelated to attributes. Is it true?
  • specialist_3specialist_3 Member Posts: 121
    As long as it is ticked, it remains true.

    I think there must be some simple logic mistake...thats all.

    Let me understand this...So you have a scene with single background where you choose

    1 player or
    2 player

    and upon clicking either of these 2 options (buttons), you proceed to the respective game scene? is that rite?
  • mrtopzmrtopz Member Posts: 28
    Not totally right.

    I have a scene where all the images are loaded (touch to begin, 1 player / 2 players, Game name, Background). When I touch the "touch to begin" image I have set it to be destroyed and this shows the 1 player / 2 players (that is loaded behind the touch image). But the Change Scene button is already on the screen. What I want is to activate this button ONLY after the "touch to begin" desapears. What is happening is that the button is always activated, no matter if I use an attribute that say to activate only after I touch the screen.
  • specialist_3specialist_3 Member Posts: 121
    can u just send over your project file...i will be able to understand this better..
  • specialist_3specialist_3 Member Posts: 121
    inkblotchgames at gmail dot com
Sign In or Register to comment.