How do I save / load multiple different elements from an array?

0 favourites
  • 6 posts
From the Asset Store
Adjusting the game screen for different resolutions (Letterbox scale)
  • I have several sprites (six).

    How can I save all six different elements into one array.

    And then load them back?

    Tagged:

  • You've asked this question twice before.

    If the answers I gave you in those posts are not working for you, you need to provide more information, or share your project file.

  • You've asked this question twice before.

    If the answers I gave you in those posts are not working for you, you need to provide more information, or share your project file.

    I need, for example:

    First element - save / load to array X 1 & all Y

    Second element - save / load to array X 2 & all Y

    ETC.

    How should I do it?

    Either I didn’t understand something, or you didn’t tell me something.

  • What does this mean - "X 1 & all Y" ?

    If you need to save all sprite properties in the array, see the demo I posted in your other topic.

    If you need to only save sprite position, then what exactly is the issue? You can do something like this

    + System: For each Sprite
    -> Array: Set value at (LoopIndex, 0) to Sprite.X
    -> Array: Set value at (LoopIndex, 1) to Sprite.Y
    
  • What does this mean - "X 1 & all Y" ?

    If you need to save all sprite properties in the array, see the demo I posted in your other topic.

    If you need to only save sprite position, then what exactly is the issue? You can do something like this

    > + System: For each Sprite
    -> Array: Set value at (LoopIndex, 0) to Sprite.X
    -> Array: Set value at (LoopIndex, 1) to Sprite.Y
    

    I need to save different elements at different positions in an array.

    I didn’t find how to do this in your project

    I created a schematic how I want to do it:

    I hope, i showed clearly.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • -> Array: Set value at (0, 0) to Cube.X

    -> Array: Set value at (1, 0) to Cube.Y

    -> Array: Set value at (0, 1) to Circle.X

    -> Array: Set value at (1, 1) to Circle.Y

    Check out Russian C3 communities:

    prodevs.ru/forum

    vk.com/prodevs

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