Global Player Traveling to Other Layout Problem

0 favourites
  • 1 posts
From the Asset Store
Globals 2.0
$3.99 USD
Globals 2.0 stores and group variables. You can also load and save data (variables) from/to JSON files.
  • [attachment=0:13hjrnj9][/attachment:13hjrnj9]


    This is the event and those are the actions that handle setting the player's position when he enters a new layout.

    It works fine for layouts that are the same height, it becomes completely useless when the layouts are not the same height.

    I.e. I have two layouts that, one is 256x896y. Two is 256x224y. I have a door at the bottom of One, x8 y640. That door leads to Two, where the door is at x256 y192. When the player enters the door at One, he's supposed to end up at Two with the same X, Y position. Minus 35 in the X so the player is in front of the player.

    What happens however, is that the player spawns in the utter lower left corner, bugged into the wall.

    But that doesn't happen is I set the door to the same X, Y position.

    I've tried nullify the player's position, remove the Door's position so that the player's position is set to only the offset which is controlled by an instance variable but nothing works.

    It's driving me mad, I've been swearing at my computer for the last 3 hours.

    Can anyone help me with a fix for this? Or come up with a different way to travel between layouts.

    I really need help with this.

  • 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)