How do I Position HUD with Scroll to on Character

0 favourites
  • 7 posts
From the Asset Store
All popular touch mechanics - scrolling, zooming, swiping
  • ok so for my game i have these specs:

    layout size: 2240, 1280

    window size: 960, 640

    Have setup my level where the character starts in the bottom left corner and he eventually works his way right and then up around back to the start(like a snake going counter clockwise)

    The view set to scroll to on my player so he is always in the middle of the screen.

    I have setup a hud on the first layer(5th so not really first ) and tried a few different things to get it to work;

    Paralax set to 0, 0 set items on top of screen just below where i see the top of the game window when testing, and I dont see the hud items.

    Paralax set to 0, 100 I now see the hud items where I had them placed at the top of game window(not the top of the level) but the hud items do not scroll up when the players is moving up in the level.

    set the paralax to 0, 10 with object behaviors bound to layout and still no dice they hud will not scroll up with the player !

    TLDR; Cannot get my hud to move up the screen when the player is moving up and forcing the screen to follow.

  • Hi,

    Normally you just need to create a layer above the layer your player is and to set the Paralax to '0,0' and playe your elements at the left side of the layout (note your windows size)

    It works fine for me, check out this HTML5 demo and tell me if this is what you want <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink">

    http://envato.wdbase.de/wp-content/demo/candyland/

    Then I can show you the setup.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Set the paralax to 0,0

    put the hud elements within the dotted line in your editor..

    The dotted line is your original viewport..

  • Is there a way to change the original viewport?

  • Was thinking way to hard at this one sorry..

    Your right all i had to do was put the elements in the dotted lines even though that's not where it started when viewing the game(obviously)

  • It's easy to overthink this stuff.

  • kepoly

    Aside from separate layer + parallax(0,0) already mentioned, you might want to give the HUD elements the Anchor behaviour so that they maintain their position relative to the edges when scaling to device resolution.

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