Changing layout weirdiness

0 favourites
  • 3 posts
From the Asset Store
Simplistic hyper-casual game with nature elements. Tap to switch between the 4 elements and reach a better score.
  • Hello.

    My name is ErekT and I am experiencing funky behaviour when I switch layouts in-game. My player object is global, has platform behaviour modified through events, and a sprite and camera focus object attached to it. On the first layout everything is swell but on switching back and forth between the first and second layouts strange stuff begins to crop up.

    On the second layout, the player object, which is the one colliding with things, will begin to trail off away from the sprite pinned to it along with the camera object the further the scene scrolls. That's pretty strange in itself, but weirder still; the camera focus has a scroll-to behaviour attached to it so scrolling is supposed to follow the focus object at all times. But it doesn't! It follows a position in front of the sprite instead for some reason. There's always the chance I just goofed something up of course, but this is really beginning to smell like a bug in Construct.

    Switching back to the first layout things behave as normal again, except now the pinned sprite has become slightly offset from the player object. This is cumulative: Every time the game returns to the first layout the sprite position gets displaced some more. No biggie, if the pin refuses to behave I can just ditch it and set the sprite position manually instead. It's still odd, though.

    Here's a link to the project. The player object is the green box and the camera focus is the purple one. The player spawns outside the screen so just hold right until the layout changes. Double-tap to run.

    dropbox.com/sh/wnurgzzx0csw37p/62k89jIl3w/Prototype_Folder.rar

    I have no clue how to fix this so any help is very much appreciated!

  • You have different layers on both layouts. On the first layout your P2_images sprite is on the 'Locked Layout' layer that doesn't exist on layout 2.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Aha! That worked, thanks for the help! :)

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