How do I save positions to an Array.

0 favourites
  • 1 posts
From the Asset Store
Vector illustration of a UFO with an alien in three different positions.
  • I have some objects scattered around the map. I want to save these positions to an array, so that it can be read later.

    I want to save the positions and the angles of several objects as they spawn to an array and load them on a function call.

    I also need to be able to delete entries from the Array, as these objects can be picked up, and should no longer be present in the array.

    * I was thinking to use. On created. then Array>Push to add the objects in the list. (something like that)

    * As an object is picked up (Destroyed) i want to delete a whole row of X.

    * As a function is called. I want to spawn (Create) objects according to the array in the correct positions.

    I don't need to save them as they are created. Another solution would also be to Save all the positions on a function call, which ever is better.

    My array would look something like this.

    Would this work?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)