Array

0 favourites
  • 3 posts
From the Asset Store
Supports 1D, 2D, 3D arrays. Import and export arrays in JSON format
  • Hi guys, I have a doubt about my game that I'm creating "Level Editor" I created a method to save each new object that is created in the array, I created a variable to memorize the last saved object so whenever a new one is created it will never replace one object already saved in the array, but I'm having trouble with how to do it in case the player deletes an object, instead of leaving several lines of the array empty, simply deleting them and the variable of the last object saved without affecting the variable of the last object created.

  • Store the uid of any object created as your first x value.

    You can then use indexof(uid) to get and delete the line of any specific object in the array.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Store the uid of any object created as your first x value.

    You can then use indexof(uid) to get and delete the line of any specific object in the array.

    yes I already do that, but I use a Global variable to memorize the last object created, so I need that when an object is deleted from the level the global variable needs to locate the object that was deleted and resume in the last state without having to leave empty lines backwards

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