On-screen controls moving...?

0 favourites
  • 6 posts
From the Asset Store
This is a code so you can see the same skin on all screens (peers). Each peer gets a skin, in addition to 4 directions t
  • Hi all, first time I've tried to make a game without explicitly following a tutorial, so bear with me...

    Okay, I'm making a game where the player sprite can roam a large(ish) map, and the screen moves along with it. I'm trying to place an on-screen controller in the bottom right corner, and can get it to stay put by placing it on a "Hud" layer, but my problem is this: when I hit the extreme edge of the layout, the sprite stops, the background stops, but the controller sprite decides to move across the screen in the opposite direction.

    Any ideas?? <img src="smileys/smiley18.gif" border="0" align="middle" />

  • sound strange.. are you sure it is your sprite and background that stops? arnt they just moving away from your HUD?

    Can you post a .capx file. would make it easier to help.

    If you are doing a HUD make sure to set the parallax to 0,0 of the HUD layer

  • Yeah I know, it's weird... it scrolls fine with the background UNTIL I reach the edge, and then it moves away.

    Anyways, here's the capx: dl.dropboxusercontent.com/u/28499111/spacegame.capx

  • I had to delete some stuff in your capx to find out what was wrong etc. (i couldnt find the sprites you used for up down etc in the layout :-)

    But this should work now.

    You forgot to pin the sprites you use for controls. And you only have to pin it once, not every tick.

    .capx

  • Thanks! Would you mind running me through how you did it? I want to gain a bit of understanding behind the problem and fix :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There is not that much to go through. Take a look at the .capx file, then you can see what i have changed compared to your .capx file.

    As i said you just didnt pin your sprites for movement to your "movement" sprite background.

    So you could see your nice "movement" background sprite, but the control that you have made to click on, would be in a different place on the map entirely.

    Dont know if that made it more clear.

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