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
30
S
13
G
21
Posts: 838
Reputation: 14,656

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
248
Posts: 3,758
Reputation: 138,067

Post » Sun Apr 24, 2016 3:02 pm

Ok I understand, thank you !.
B
30
S
13
G
21
Posts: 838
Reputation: 14,656


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 11 guests