Changing layout weirdiness

Get help using Construct 2

Post » Sun Jan 06, 2013 6:10 pm

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.

https://www.dropbox.com/sh/wnurgzzx0csw37p/62k89jIl3w/Prototype_Folder.rar

I have no clue how to fix this so any help is very much appreciated!ErekT2013-01-06 18:11:00
B
22
S
6
G
1
Posts: 398
Reputation: 3,384

Post » Sun Jan 06, 2013 7:08 pm

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.
B
54
S
28
G
18
Posts: 1,520
Reputation: 25,000

Post » Sun Jan 06, 2013 8:14 pm

Aha! That worked, thanks for the help! :)
B
22
S
6
G
1
Posts: 398
Reputation: 3,384


Return to How do I....?

Who is online

Users browsing this forum: Aserak2012, Google [Bot], ManuelPerez and 22 guests