hello I have a variable called fruitscore that adds 1 to another variable called compcounter for every 100 of fruitscore. how to I do that in 1 event and not have to add an event every 100, 200, 300 etc?
events
hello I have a variable called fruitscore that adds 1 to another variable called compcounter for every 100 of fruitscore. how to I do that in 1 event and not have to add an event every 100, 200, 300 etc?
events
Do one of these two solutions help?
Or
thanks for reply the first solution I’m not sure exactly how to do that also what is mod?
the second solution I tried adding
but comes up you must enter a number?
I had meant for you to use compcounter = trunc(…) as an action, not a condition.
However, you may have unwittingly identified a third, even better way - modify that condition just a tad by making it " < trunc(Variable(fruitscore)/100)"
. That should work for you.
It also means if score jumps from say 98 to 120, compcounter will still get incremented just once. It’ll also cover a sudden big score change, like from 20 to 550.
that worked perfectly and with multiples of 100 thanks for your help!