Basic equation doesn't compute

jasongreenojasongreeno Member Posts: 23
edited November -1 in Working with GS (Mac)
Hi folks,

Awesome product. Great Community.

Problem:

When button is clicked:

Var3 = 10000

Constrain Var1 = Ran(1,3)*1000

Constrain Var2 = Var1+Var3

Display Var2

First result is fine. It's every result after that is too high. Instead of being 1-3K each time the button is pushed and added to the previous amount, the total jumps by random amounts of 10K or more. What am I missing?

Comments

  • quantumsheepquantumsheep Member Posts: 8,188
    Sounds like you're missing a 'reset' function.

    i.e. the values held in variable 1 are 'kept'. So you may get variable 1 = 3000, then it'l add to that 3000 the next time you press the button.

    Maybe.

    Or you might want to 'change variable' instead of 'constrain variable'

    Good luck!

    QS :D
  • jasongreenojasongreeno Member Posts: 23
    Thank you quantumsheep.

    The suggestion to utilize 'change attribute' instead of 'constrain attribute' fixed the problem.
  • quantumsheepquantumsheep Member Posts: 8,188
    Oh cool! Nice one :D

    QS
  • chosenonestudioschosenonestudios Member Posts: 1,714
    I love the title of this thread. (Just saying).
Sign In or Register to comment.