Problem with array.

Discussion and feedback on Construct 2

Post » Sun Apr 24, 2016 2:32 pm

Hi, please can anyone help me with this ?, I go straight to the point.

At the beginning of the layout I save all existing positions of sprites and destroy one by one.

Then, when you touch, do respawn sprites in their positions but are not positioned properly, all sprites is in coords 0, 0.

What am I doing wrong?.

https://dl.dropboxusercontent.com/u/60803633/test5.capx

Image

Image
B
33
S
13
G
22
Posts: 847
Reputation: 14,826

Post » Sun Apr 24, 2016 2:50 pm

loopindex isn't used when you use the 'Array.For each'. loopindex is a System expression. Switch to For "" from 0 to Array.Width-1, and it works.
ImageImageImage
B
71
S
22
G
274
Posts: 3,828
Reputation: 151,299

Post » Sun Apr 24, 2016 3:02 pm

Ok I understand, thank you !.
B
33
S
13
G
22
Posts: 847
Reputation: 14,826


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 17 guests