How do I

Get help using Construct 2

Post » Mon Feb 29, 2016 1:03 am

I have a game where there is a Distance of which the player has ran. However, I want something to happen every '5000' the distance number reaches. Ex: 5000, 10000, 15000, etc...

How can I come about doing this? :?:
B
11
S
3
Posts: 12
Reputation: 703

Post » Mon Feb 29, 2016 1:14 am

you could use "modulo"(%)

Assuming Distance is your global variable, the event looks like this:

system:compare 2 values Distance%5000=0 and Distance /= 0 and trigger once then your event
Image Image
B
22
S
13
G
135
Posts: 871
Reputation: 70,320

Post » Mon Feb 29, 2016 5:38 am

This isn't working. This is my layout

System 5000 = 0
System TotalDistance /= 0

-events-

Am I doing something wrong?
B
11
S
3
Posts: 12
Reputation: 703

Post » Mon Feb 29, 2016 10:34 am

Image
Image Image
B
22
S
13
G
135
Posts: 871
Reputation: 70,320

Post » Mon Feb 29, 2016 10:15 pm

It doesn't seem to work. :(
B
11
S
3
Posts: 12
Reputation: 703

Post » Mon Feb 29, 2016 10:28 pm

could you share your capx? or a screenshot of your events?
Image Image
B
22
S
13
G
135
Posts: 871
Reputation: 70,320

Post » Mon Feb 29, 2016 10:37 pm

B
11
S
3
Posts: 12
Reputation: 703

Post » Mon Feb 29, 2016 10:53 pm

which condition did you use in 2nd condition?
Image Image
B
22
S
13
G
135
Posts: 871
Reputation: 70,320

Post » Tue Mar 01, 2016 1:07 am

Compare Two Variables
B
11
S
3
Posts: 12
Reputation: 703

Post » Tue Mar 01, 2016 1:12 am

system compare variable
Image Image
B
22
S
13
G
135
Posts: 871
Reputation: 70,320

Next

Return to How do I....?

Who is online

Users browsing this forum: unxcellent, Yahoo [Bot] and 10 guests