How do I search an Array for a index and set it to 0?

Get help using Construct 2

Post » Sun Aug 20, 2017 1:25 pm

Title is self explanatory, I'm using an array for a Final Fantasy style combat system. At the beginning of the turn it maps who's alive and stamina they have, depending on the stamina stat the array orders it into who attacks. After the unit attacks, the array shifts down until everyone has attacked.

However if a unit dies before it has had it's turn I want it to be removed from the array since y'know it can't attack anymore. I know the event to search the array for index containing the value i'm looking for. But when I go to set the index how do I reference the index that has been located in the conditions? I want to to use the "Set X" action.

Any help would be appreciated.

Link to a visual example of my problem here:
Last edited by PixelatedTrip on Sun Aug 20, 2017 3:45 pm, edited 1 time in total.
Posts: 28
Reputation: 362

Post » Sun Aug 20, 2017 3:14 pm

Hey Pixel,

If you know what the name of the index is you are looking for in an array, you can target the column by using


So if you want it removed from the array you just use the delete action from the array object, then set the X to be the above.
Posts: 1,102
Reputation: 14,423

Post » Sun Aug 20, 2017 4:19 pm

This fixed it, thank you very much sir.
Posts: 28
Reputation: 362

Return to How do I....?

Who is online

Users browsing this forum: MaxM, ultrafop and 6 guests