Multiples

Hi all, im just wondering how you make something trigger for every multiple of 5, this is what i got atm but how to you write multiple of 5, its baffling me lol, anyway if someone is kind enough to help heres what i got.

i have tried

condition - the number of chipstack1 = 5.          actions - delete chipstack1 and create chipstack5 at coordinates

the problem with this is when i put a chip on other things, once theres 5 it deletes them all i just need it to delete the ones from a specified position.

I don’t understand the problem very well, but the condition to check if a value is multiple of 5 is:

mod(value, 5) = 0

“mod” returns the remainder of the division “value / 5”, if “value” is multiple of 5, the remainder of the division is 0.
Note that mod(0,5) returns 0, so maybe you want to check if the value is non-zero :wink:

Ill see if it works when i get home thanks i just want it to trigger every multiple of 5 instead of variable 0 = 5
Im guessing it will be variable 0 = mod(0,5)

Calling a variable “0” doesn’t sound like a good idea, but I think the condition should be:

mod(Variable(0), 5) is = 0

Your condition:

variable 0 = mod(0,5)

Will be true when Variable “0” is = 0 (since mod(0,5) always return 0) :wink:

ahhhhhhh i see how it works ill explain what im trying to do,

im trying to make a roulette table, basically i want it to create chipstack1 on a certain number, i was using the number variable to to determine when to delete chipstack1 and create chipstack5 which i had working, but then realised that i was using the count how many chips method which when you bet on 5 seperate numbers it takes the 1 chip off all 5 and merges it into a 5 on the last number bet on.

im sure ill figure it, its abit long winded because iv commented every event so i can post it on tutorials page as it uses alot of variables and use of random numbers and multiples, when i figure the thing out :slight_smile:

btw variable(0) is just the name for the number so when you click it, it adds 1 to that variable to multiply by 36 if you win, could this cause a problem?, it works in principle just cant work the chip thing out :confused: