Bug Infinite loop?

Get help using Construct 2

Post » Fri Feb 14, 2014 11:52 pm

Hello,

I started playing with Construct 2 161 Free Edition to build a prototype for my next project, but I'm having a very strange problem with the "For" and "Repeat", they are in an infinite loop

steps:
C2 161 - Free Edition

1 - Create a blank project
2 - Use a "Repeat" or "For"
3 - The loop does not end even after reaching the set value.

Image: i.imgur.com/SPftx9e.png

Is anyone else having this problem?
If the error happens with someone else, I'll post in the bugs section.
B
2
Posts: 1
Reputation: 202

Post » Sat Feb 15, 2014 12:31 am

You need to do a bit more reading. C2 runs your events repeatedly every tick (60 times a second). Do some of the tutorials to understand how to use C2 properly.
ImageImageImage
B
71
S
22
G
248
Posts: 3,760
Reputation: 138,071

Post » Sat Feb 15, 2014 1:00 am

What @blackhornet said.
In addition


and Manual entry How Events Work
ImageImageImageImage
B
158
S
66
G
43
Posts: 2,603
Reputation: 35,868

Post » Sat Feb 15, 2014 1:13 am

There are two types of events in C2... Continuous events (they run every tick), and Triggered events (one-off after conditions are met). Your event has no extra conditions telling it to only trigger once or happen once certain conditions are met so it happens ten times per tick(!) or 600 times per second in most cases. So shinkan's example will work if you only want the troop to happen a single time on the layout--ie, it tells it to do it once (10 loops once) at the start of the layout.
B
103
S
38
G
19
Posts: 962
Reputation: 17,996


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 15 guests