How do I make change every 25 score?

Get help using Construct 2

Post » Mon Feb 22, 2016 10:41 pm

Hey guys!

I was trying to figure it out on my own, but I just can't make it work.
So here is the problem...
I have 4 different backgrounds and I want them to change randomly every 25 points.

Do you know how to do it?

I know that i need random(0,3) for bg. I just can't get right that every 25 points trigger.

Thanks for help! :)
B
10
S
1
Posts: 42
Reputation: 620

Post » Mon Feb 22, 2016 10:59 pm

Similar issue here - viewtopic.php?f=147&t=168839

Use the modulo expression (%). This is the remainder after a division. So your condition would be ScoreVariable%25 = 0 (with trigger once while true). This means after dividing your ScoreVariable by 25, there is no remainder, or every multiple of 25.
Mistakes were made.
B
52
S
26
G
109
Posts: 1,611
Reputation: 61,643

Post » Mon Feb 22, 2016 11:24 pm

Thanks a lot man! :D I knew i needed something like 25 x some unknown to devide the score. :D Appreciate it! :)
B
10
S
1
Posts: 42
Reputation: 620


Return to How do I....?

Who is online

Users browsing this forum: Armench, farsen, PROxMTswatTR and 21 guests