<Solved> Add 1 to X Variable every 3 Y Variable

Get help using Construct 2

Post » Sun May 17, 2015 11:32 pm

Hi
Thanks for looking.
I want to add 1 to the Global Variable (GV) Difficulty
when the the Streak is at 3,6,9,12.
I was trying the below code but it doesn't work.
If possible please provide an actual example.
Image
If possible please provide an actual example.

oh, btw, I know how to do this the 'Neanderthal method' and make an event for each condition
but I am trying to learn how to improve and simplify my code.
Last edited by producermark11 on Mon May 18, 2015 9:07 am, edited 2 times in total.
B
36
S
10
G
4
Posts: 250
Reputation: 7,963

Post » Mon May 18, 2015 7:29 am

If I remember correctly how to use the modulo

System compare two values : Streak%3 = 0
trigger once
> add 1 to difficulty
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon May 18, 2015 8:37 am

@LittleStain
Yes that does it.
Thanks so much.

and here is what it looks like for those that like pictures ( like me :D )
Image

the %3 triggers every 3 'steps' in this case,
but if a person wanted it to trigger every 2 steps it would be ~~%2
every 4 steps ~~%4
and so on.
B
36
S
10
G
4
Posts: 250
Reputation: 7,963


Return to How do I....?

Who is online

Users browsing this forum: dop2000, NN81 and 22 guests