How do I keep an object's position across layouts?

0 favourites
  • 3 posts
From the Asset Store
Welcome! I-Spy (Hidden objects) is an educational puzzle that is more than just seek-and-find activities.
  • I'm trying to create a game in which the player can place different objects onto the layout to create a custom vehicle, and I need this custom vehicle to transfer to the game layout, so the player can use it. I have tried to use the Persist behavior, but it only seems to work with object states, not position. Would I need to save each object's position to an array, or can I use local storage/dictionary? Am I using the Persist behavior wrong?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Persist is so the object stays the same when you go to another layout and come back later. You probably want to make the objects global so they don't get destroyed when the layout changes.

  • The game layout contains the objects that I've set to global. They snap to the position that is set in the layout editor when I visit this layout. Is there any way to snap them to the position they are left in in the build layout?

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