How do I delete a data in my array?

0 favourites
  • 6 posts
From the Asset Store
Data+ is the best Data Management solution for Construct 3. It contains 4 Addons (Plugin & Behavior).
  • Hi everyone,

    I actually try to delete a data in my array but don't really know how I can do it. My array is width 0 and Height 4 and I recorded my object's Json in it plus 3 variables like UID and my ObjectTypeName.

    So it's look like this in my debug inspector (btw how can I see all the informations as the bloc can't be resized?) :

    I want now, after a trigger to delete the corresponding object in my array.

    I was thinking about looking for every X element in my array with the corresponding UID name, saved as a variable:

    Unfortunately it doesn't work. Maybe I forget something?

    Thanks for your help!

    Tagged:

  • You've used IID in the action which is different to the UID. Also you don't really need the loop if the outcome is to delete the row containing the UID, you can add the action to the '=dead' condition and if it finds the value it will delete the row.

  • Oh yes you'r right, my mistake. But even corrected, it doesn't delete all the datas. My purpose is to delete everything in the X axis but also in the Y, like 0,0 0,1 0,2 and 0,3

    These are my saved values, and I want them to be deleted:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Deleting the X should delete the entire row so all the data. On second thoughts it may not find the other column data using indexof so maybe don't use that and use the loop that you had, then for the action delete 'array.curx' for the row.

  • It's working! Thank you!

  • Great :)

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