On / Off Button Question

perfectanswerperfectanswer PRO Posts: 121
edited November -1 in Tech Support
Hi,
I'am very happy with the Video from tsb after poking a hour around to find a solution for this.
In the Video tsb use a int Attribute and add +1 to the attribute.

The tricky thing was the game.myattribute +1%2 to add 1 to the int counter, but with the %2 its like a bool and switch between 0 and 1. Great Tipp!!!

But unfortunality in 0.95 it counts to infinity and ignore the %2.

I'am looking for another solution, workaround or a advise in the right direction ;)

Thanks for helping in advanced
PerfectAnswer

Comments

  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    I think your problem is probably lack of Parenthesis.

    Should look like (game.attribute+1)%2

    I have projects with this working fine. So im guessing its an issue in your expression. Also you game.attribute should be an integer or real type attribute.
  • perfectanswerperfectanswer PRO Posts: 121
    Very Best Answer after 8 minutes!

    tenrdrmer, a very big thank you, you save my day ;))

    PerfectAnswer
Sign In or Register to comment.