dimensioning array

Discussion and feedback on Construct 2

Post » Sun May 06, 2012 2:12 pm

Hi everyone.I am using beta 88 and I am trying to use the push/pop array feature .If I run a loop say 100 times (0 to 99) and push a value to it the array length shows a value of 101.I did a test where at the start of frame I set the array size to 0.According to the manual this should give a totally empty array with no elements.If I show the size of the array it still gives a length of value 1,rather than zero as I expected.Is this a bug or something I am doing wrong?
B
27
S
2
G
3
Posts: 61
Reputation: 2,498

Post » Sun May 06, 2012 10:48 pm

I'd say it's a bug, well, actually it's a carry over from before the array object had push/pop and any size lower than (1,1,1) had no purpose. I'll file a bug report.

As a workaround you can make the size 0 by setting the size to 1,1,1 then using the pop action.

B
79
S
24
G
54
Posts: 4,745
Reputation: 40,753


Return to Construct 2 General

Who is online

Users browsing this forum: Eisenhans, Televangelist and 4 guests