Multiples of a value

I am trying to make a sound file play every time my variable called score reaches a multiple of 5. I have absolutely no idea how to achieve this. Can anyone help?

hi
I think a function to get the rest of a division. So if your score divided by 5 has rest 0 you play the song. I think the function is MOD, not sure.
Tehn you should have a variable to not play again while score remains the same

how would I achieve the variable to not play again while score remains the same?

you can use a variable to store last score and add as condition that score and last score sre different
f.ex.
at beginning of scene
do=-1 to scene variable lastScore

inside the game loop 2 conditions to play music
variable(score) mod 5 = 0
NOT lastScore=Score

then play music and set lastScore=Score


This is what I have and it just plays as soon as I start the game and not at all when I get the score to 5

Ended up using a second variable that goes up with the variable score and resets every time it gets to 0. Thank you for the help sir

ok, but in your code you mixed 2 different variables score and Score are not the same :frowning: This is the problem of not declaring variables, gdevelop asumes it is a new variable and you won’t get an error message