looping

For questions about using Classic.

Post » Fri Apr 17, 2009 11:45 pm

Hi.Just discovered this programme and am quite impressed.Very similar to Multimedia Fusion but better laid out.My question is can you start a loop from 0 rather than 1.
B
27
S
2
G
3
Posts: 61
Reputation: 2,498

Post » Fri Apr 17, 2009 11:58 pm

Just subtract 0 from the LoopIndex when it's used I guess.. but why?
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529

Post » Sat Apr 18, 2009 12:10 am

I'm attempting to put a grid of sprites(9x9) down using a nested loop.I want the first spite to be at position x=12 y=12.
ie create sprite sprite (loop index(loopx)*64)+12,(loop index(loopy)*64)+12

this at the moment positions the first sprite at x=76 y=76
B
27
S
2
G
3
Posts: 61
Reputation: 2,498

Post » Sat Apr 18, 2009 12:17 am

As rich said, just subtract 1 from the loop index... or use a For loop from 0 to whatever number you need...
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,554


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 1 guest