[r75] Loop apparently running without a loop

Bugs will be moved here once resolved.

Post » Mon Jan 16, 2012 1:26 am

http://www.amirai.net/bugs/loopswithoutloopsbug.zip

Apparently having an object overlap multiple instances of another object and doing a collision check causes a 'for each object' loop to run even though there's no condition for it.

Happens on chrome, IE, FF. Vista 32 bit.Arima2012-01-16 01:28:13
Moderator
B
87
S
32
G
33
Posts: 3,005
Reputation: 27,397

Post » Mon Jan 16, 2012 1:12 pm

This is actually by design at the moment, but it's a really tricky one to get right. I'm aware of issues that it causes, but at the same time sometimes it's desirable to have it loop for you as well. It's not identical to a 'For Each' loop either, since it picks the colliding pair of instances at a time. Also, changing it could subtly break existing projects.

I think it would be worth putting it back to the non-foreach way though, I can imagine it would be confusing.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,468

Post » Mon Jan 16, 2012 6:09 pm

Yeah, I think it's a lot better to have to manually put in a loop. Please, please put it back to the way it was! I think it's way less confusing than having construct automatically run one, and also gives the user more control about if they want one or not. I'm not even sure how to work around it the way it is. :/
Moderator
B
87
S
32
G
33
Posts: 3,005
Reputation: 27,397


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 3 guests