Issue with 2 layouts using one event sheet. heeellllllp

0 favourites
  • 9 posts
From the Asset Store
With this template you will learn how to use the GooglePlay Games native plugin
  • Okay so Im working on a 2d mario galaxy style platformer. I finished the first level, everything works perfect. I created a second layout, which is using the event sheet from layout one because not too much technical stuff is different, I dont know optimizationaly if this is a good idea or a bad idea, Im still a n00b.

    Im using invisible circles that changes the angle of gravity on the planet that way you can walk around it, works perfectly in both layouts.

    The issue is my screen rotations. the screen rotates in order to follow the player.

    Im using the code: System>Every Tick> System> Set layer 1 angle to anglelerp(LayerAngle(1),Player.Angle, dt * 2) degrees

    The second layout, using layer 1 as the layer to rotate, does not rotate like it does in layout 1. Oddly the planet moves in a giant circle like the player is riding a unicycle lol.

    Im new to construct, and that might have sounded confusing, sorry if it did. I also cannot upload the capx due to using the WiiU plug in. But here is a video of the working level 1.

    Does anyone know why it wont work on the second level? And how I can avoid this later on? Thanks!

  • p0tayters

    On layout 2 have you included event sheet 1.

    iGamersBox sent me these images when i was trying it. Hopefully this will help.

  • p0tayters

    On layout 2 have you included event sheet 1.

    iGamersBox sent me these images when i was trying it. Hopefully this will help.

    I did, I even just now went in a created a whole new event sheet and recoded it all just to see. In the video I posted (dont know if you watched it or not) the planets are not moving when the player walks, thats layout one. In layout 2, when you walk the planets are physically moving in a circle, like they're rotating around some non-existent object. It has me baffled.

    Thanks for the input though!

  • http://youtu.be/VwxLT-wKN2s

    Thats what its doing, see how the planet is moving rather than staying stationary? I have no idea why its doing it now.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • you may need to post a capx of your project so we can see whats happening

  • Not allowed to post capx, Nintendo NDA and all that.

  • Thats whats making this all the much harder for me lol. I dont know construct2 very well, learning as I go, and Im working with the nintendo stuff.

  • I can post this though. Its the code that changes the gravity and the one line that rotates the screen. Thats all there is to it.

  • Fixed it! The difference between the 2 layouts were the size, the planets were rotating awkwardly due to the scroll to behavior not having enough room to follow the character around.

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