Random number generation
I am sure there is an easy fix to this, but I can't seem to find it. I want a random number generated each time a player does touch release behavior on an actor. If the random number is above 10, a new cell value of [current cell value]-5 should result in a table.
Here is what I have:
When touch is pressed and,
Numeric expression, random (1,20) is >=10
Change table value, table name, row 1, column 1 to function table cell value (table name, row 1, column 1) -5
This works when I touch the actor, but when I release touch and touch again, the randomly generated number part of this rule does not start over. So if I get a random number result over ten, the number decreases by 5 as it should, but then every time I touch, it keeps reducing by 5 as if a newly generated random number is never being generated.
So how do I get the random number to generate each and every time I do the touch behavior?