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
35
S
14
G
22
Posts: 920
Reputation: 15,108

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
72
S
22
G
288
Posts: 3,862
Reputation: 158,460

Post » Sun Apr 24, 2016 3:02 pm

Ok I understand, thank you !.
B
35
S
14
G
22
Posts: 920
Reputation: 15,108


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 5 guests