How do I transfer X and Y locations between 2 different layouts? (Solved!)

0 favourites
  • 5 posts
From the Asset Store
Adjusting the game screen for different resolutions (Letterbox scale)
  • Hi everyone. Forgive me if this is a simple answer. I'm struggling how to take a sprite's location, and place them in a layout of different size relative to their original positions in the 1st layout. Here's a visual aid that will explain what I mean.

  • Hello! I'm newish to construct, but this is what I would do: have an object that is centered to your viewport spawn them on the start of the layout. That way you have their position the same every layout. I don't know if this is your issue but I hope it helps!

  • Hello! I'm newish to construct, but this is what I would do: have an object that is centered to your viewport spawn them on the start of the layout. That way you have their position the same every layout. I don't know if this is your issue but I hope it helps!

    Thank you for the fast reply. Sorry I forgot to mention this before, but the sprites are capable of moving to any area within the layout. My problem is how to translate the X, and Y locations of these sprites to new layouts of different sizes similar to what they were in the original layout.

  • dropmefiles.com.ua/en/aExB

    Hi. I was having coffee this morning and had a moment.

    I'm not sure I understand the task exactly, but I did this.

    In the example there are two layouts of different sizes and a sprite that we can drag and drop.

    After moving between layouts, the position of the sprite should change to the position from the last layout, taking into account the changed size of the layout.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • dropmefiles.com.ua/en/aExB

    Hi. I was having coffee this morning and had a moment.

    I'm not sure I understand the task exactly, but I did this.

    In the example there are two layouts of different sizes and a sprite that we can drag and drop.

    After moving between layouts, the position of the sprite should change to the position from the last layout, taking into account the changed size of the layout.

    I just tried out the example, and this worked perfectly! Thank you so much this problem has been bothering me for months. : )

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