# trigger something every 10th point - C2

0 favourites
• 5 posts
From the Asset Store
Connect the dots in the correct order and draw happy animals!
• Hi Community,

I'd like to award my players every 10th point by playing an animation. How does one achieve this? (sorry my brain ain't what is used to be)

so player points increment and when hit 10, 20, 30, etc.... do something.

Thanks for any help on this,

Rob

• You can use the modulo (%) expression to achieve this:

If score%10 = 0

If score != 0 | play reward animation

Modulo checks the remainder when you divide the number to the left of % by the number to the right.

You need to check that the score isn't 0, as 0%10 = 0.

• Thanks mekonbekon,

But how do i program this into C2 please?

I get syntax error when entering '!' unknown character.

Thanks,

Rob

• But how do i program this into C2 please?

I get syntax error when entering '!' unknown character.

System: Compare two values -> Score%10 is equal to 0

System: Compare two values -> Score is not equal to 0

• ## Try Construct 3

Develop games in your browser. Powerful, performant & highly capable.

Construct 3 users don't see these ads
• wonderful!!!!!!!!!

I did think about Compare to value, but quickly dismissed it.

This is what I finally ended up with - thanks to your help!

System: Compare to values -> Score%10 = 0

System: Compare to values -> Score <> 0

Thank you once again

OddConfection & mekonbekon for your help.

Roberto

• 5 posts