How do I can multiple number ?

Get help using Construct 2

» Sun Jun 26, 2016 9:13 pm

Hi
see this exp : https://drive.google.com/open?id=0BxuM6 ... k43SEgzTTg

i want when i click red sprite subtract from global variable,e but if (exp:20 is global variable) i click red and subtract 1.24 show me 20 and when click the other one and subtract 7.51 show me 10.
B
11
S
4
G
3
Posts: 50
Reputation: 2,431

» Wed Jun 29, 2016 7:31 am

Hi
Its working well
On click green 10 is adding with each click
On click pink + subtracting 1.24
and on click dark pink subtracting 7.51
...
result is showing as per your event correctly
then what do you want ??
OR
explain more if you need some different result
B
86
S
48
G
49
Posts: 717
Reputation: 35,986

» Wed Jun 29, 2016 9:39 am

i want round of 10 for result bro. if click the boxes show the multiple number of 10.
B
11
S
4
G
3
Posts: 50
Reputation: 2,431

» Wed Jun 29, 2016 10:49 am

Multiple number of 10 means, what ?
give an example of expecting result
B
86
S
48
G
49
Posts: 717
Reputation: 35,986

» Wed Jun 29, 2016 12:27 pm

10 20 0 40 50 60 70 it's for 10
5 10 15 20 25 30 35 40 it's fo 5
7 14 21 28 35 42 it's or 7
B
11
S
4
G
3
Posts: 50
Reputation: 2,431

» Wed Jun 29, 2016 2:24 pm

Do this way: set a to round(ceil(a)/10)*10
https://dl.dropboxusercontent.com/u/659 ... round.capx
B
133
S
54
G
24
Posts: 799
Reputation: 24,306