Change Boolean Attribute When...

Hello to GS Community,

I would like to ask if anyone of you can come up with a way to do:

if Game.Success is dividable by 2 (2, 4, 6, 8, ...) Change Game.Yes to True and Change Game.No to False
+
if Game.Success is NOT Dividable by 2 (1, 3, 5, 7, ...) Change Game. Yes to False and Change Game.No to True

Cannot really come up with a workaround for that and would be happy if you help me :)

Thank you

Comments

  • jeezzcakejeezzcake Member Posts: 144

    Try this:
    if game.success%2 = 0 change game.yes = true & game.no = false
    otherwise change game.yes = false & game.no = true

  • BonepileGamesBonepileGames Member Posts: 194

    @jeezzcake‌

    Thank you but I cant really get it how to make game.success%2 since when I put an rule - attribute I can only choose in first blank place, editable is the second one.

  • zweg25zweg25 Member Posts: 738

    choose "numeric expression", and you might also have to put that whole rule in another rule which says if game.success != (does not equal) 0

  • BonepileGamesBonepileGames Member Posts: 194

    @zweg25‌

    Excuse me for my ignorance but I cannot really get it how you do that. I have searched on the Net for numeric expression and I cant seem to find anything, will you please help me out by making a picture of your screen once you implement that - I need to know how to make that thing since it is vital for my game development. Thank you

  • jeezzcakejeezzcake Member Posts: 144

    If you haven't figured it out yet, try this:

    • create an attribute (ex. check = 0 ) and use it with the Rule, like in the image below.

    Hope this is what you want.

  • BonepileGamesBonepileGames Member Posts: 194

    @jeezzcake‌

    Thank you.
    However, I managed to do it by myself in another way.

  • jeezzcakejeezzcake Member Posts: 144
Sign In or Register to comment.