How do I use an expression to express every number?

Just started using Construct 2? Post your questions here

Post » Mon Jun 30, 2014 3:00 pm

I want to trigger an action (reloading) after every 10 bullets are fired, by using (reload if bullets fired=10*every whole number), so I reload after every multiple of 10 bullets are fired (like 10,20,30...)
Thanks! :)
B
3
Posts: 2
Reputation: 235

Post » Mon Jun 30, 2014 3:05 pm

Have a variable BulletsFired that you add 1 to after each bullet is fired. Have a condition that checks the variable, and if it's 10, reload and reset the variable. If you want to keep the count, have the condition check (BulletsFired % 10) = 0
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Wed Jul 02, 2014 11:18 pm

Thank You!
B
3
Posts: 2
Reputation: 235


Return to Beginner's Questions

Who is online

Users browsing this forum: thewisetree and 1 guest