While loop problem

For questions about using Classic.

Post » Sun Mar 15, 2009 9:13 pm

if i have two Sprites A and B and want A to move to the right while overlapping with B:

If I use the A overlaps with B the loop only iterates once per frame.
If I change it to use the System is Overlapping A and B it works perfectly.

Why aren't these two behaving in the same way?
B
4
G
3
Posts: 46
Reputation: 992

Post » Sun Mar 15, 2009 11:18 pm

Can you upload a .cap that shows the difference?
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,518

Post » Mon Mar 16, 2009 6:05 am

Example cap [url:2m69vm8n]http://www.scirra.com/phpBB3/download/file.php?id=412[/url:2m69vm8n]

I have another example with a flood fill of detector objects
[url:2m69vm8n]http://www.scirra.com/phpBB3/download/file.php?id=413[/url:2m69vm8n]

This example only works with one of the two types of overlapping. And when it works it for some reason inserts two detectors at the first block posisition. That is also a bit weird (bug?)
B
4
G
3
Posts: 46
Reputation: 992

Post » Mon Mar 16, 2009 3:21 pm

Looks like a bug, better submit it to the tracker.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,518

Post » Mon Mar 16, 2009 9:51 pm

yes, i noticed this also. using a regular is overlapping with a while causes a crash. however, using advanced overlapping seems to do the trick.
B
25
S
3
G
6
Posts: 1,197
Reputation: 5,620

Post » Tue Mar 17, 2009 9:28 am

My problem is that with the advanced overlapping I get an extra "overlap event" with an instance that is already destroyed.
B
4
G
3
Posts: 46
Reputation: 992


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests