How do I append array size?

Get help using Construct 2

Post » Mon Mar 06, 2017 5:55 pm

Hello all, I've searched around the forums for any insight on increasing and decreasing array size within Construct 2. Nothings working for me so I'd like to call for help! ( ;) i loved that show)

So what I'd like to do is set the size of the array on trigger, back down to 1, 1, 1. I want to add to that array's X size. Let's say this is an apple picking sim, the basket for the apples is the array and the apples are the future elements. Every time I pick up an apple, basket X size increases by one and adds the element.

I have everything working until I play with the array size. I've used Array Set Size (Self.width + 1, 1, 1), I've tried 'Pushing' and 'Popping', I've also tried 'Insert'.

I suppose I need some clarification on which actions erase the arrays elements. From the array reference page setting the size keeps element values, until the array size becomes smaller than it's prior size.

Thanks in advance!
B
5
Posts: 9
Reputation: 248

Post » Mon Mar 06, 2017 6:09 pm

So I actually got it working, I can upload the capx for any future viewers I suppose.

My logic was solid, I just had the wrong condition in one of my if else structures...
B
5
Posts: 9
Reputation: 248


Return to How do I....?

Who is online

Users browsing this forum: ChoosyZerk, lordsas and 77 guests