Boolean issue. When touched is pressed.. works. Touch again = Fail.

ozboybrianozboybrian PRO Posts: 2,102
edited November -1 in Working with GS (Mac)
So i've got a button actor that changes another actors is image.

Button:
When touch is pressed change att game.boo to true.

On image actor if game.boo = true change image.

Works fine.

but when rule for button is pressed AND
game.boo = true change game.boo to false.

image actor if game.boo = false change image back.

No idea why that wouldn't work.

PS please don't scald me after my post about "I'm finally getting attributes yay!"

thanks ; )

Comments

  • mynameisacemynameisace Hull, UKMember Posts: 2,484
    Hey Buddy,

    Put the rule in the rule... Haha that makes no sense...

    Maybe this will help...

    image

    Ace
  • mynameisacemynameisace Hull, UKMember Posts: 2,484
    Doing it this way isn't triggering it a million times back and forth.

    Ace
  • ozboybrianozboybrian PRO Posts: 2,102
    You're a legend mate.
    Works perfectly now! Only just learned about the otherwise rule. Gotta get the hang of it!

    Send me a email, would love to know how that million dollar game of your is going.

    Thanks again. : )
  • mynameisacemynameisace Hull, UKMember Posts: 2,484
    I'll come on Skype later ;)

    Ace
  • ozboybrianozboybrian PRO Posts: 2,102
    LIKE ^
    I'll be off in 30 mins :/

    Back on in........... 17 hrs from then.
  • mynameisacemynameisace Hull, UKMember Posts: 2,484
    I'm on now... You aint on my list anymore :S

    Ace
  • ozboybrianozboybrian PRO Posts: 2,102
    Huhhhhhh O_O

    ozboybrian
  • ozboybrianozboybrian PRO Posts: 2,102
    It says pending contact request
  • Rob2Rob2 Member Posts: 2,402
    A much simpler way of achieving a switch would be

    change attribute game.boo to 1-game.boo ( game.boo as an integer ) and then test for 0 or 1 in your image actor.
Sign In or Register to comment.