How do I every 5 points in score ?

Get help using Construct 2

Post » Fri Jun 16, 2017 3:56 am

Hi,
i would like to create an object when the player score something like 5 , 10 , 15 , 20 , 25 (every 5 points)
how can i done it ?
thank you
B
46
S
16
G
8
Posts: 794
Reputation: 8,335

Post » Fri Jun 16, 2017 7:35 am

Conditions:
compare variable: score>0
compare two values: score%5=0
Actions:
Create object

Explanation: the "%" sign is for modulo, or the remainder after division. If the score is a multiple of by 5 this operation will return 0. You also need a second condition so that this action does not run when score is equal to 0 as 0%5 will also give 0.
B
15
S
6
Posts: 85
Reputation: 1,195

Post » Fri Jun 16, 2017 9:19 am

thanks a lot
B
46
S
16
G
8
Posts: 794
Reputation: 8,335


Return to How do I....?

Who is online

Users browsing this forum: beohs, Blendi1223, Elliott, MadSpy and 10 guests