How do I append array size?

0 favourites
  • 2 posts
From the Asset Store
220 Food Sprites in 16x16 pixel size. Perfect for items for a retro style game.
  • 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!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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...

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)