How do I make my HUD follow my layoutangle?

0 favourites
  • 9 posts
From the Asset Store
Use this epic life system with hearts like famous games in your game!
  • Hey!

    I'm new with construct2 and basically I just try things

    So, I have this kind of plateform game and my Layout angle can sometime be equal to 180.

    And I have an HUD for score too, made with text and sprite. (I put a Layer with a (0.0) parallax to do that)

    It works well with the sprite, when the angle of the layout changes, the HUD sprites are following the player.

    ...But the score text is just being weird, it seems it's doing a reverse parallax. (when I jump, it goes down instead of going up with me..).

    I can't figure why it's doing that thing, specially since it's working perfectly well with the sprites..

    I dont know if I express myself goodly.. If you dont see what I mean I could post a demo showing this problem.

    Bye everybody and thanks in advance for the ones who will read and help!

  • Always best to post a CAPX.

  • so you can see what it does there.

    when You jump, the angle of the layout is changed to 180. The blue rectangle is still following the screen, but the text isn't. (you can go and jump on the platforms on the right to see that)

    It's weird since they are in the same Layer.. Can't understand. Any explaination? =)

    (edit: oh, I cant post links.. Well I just put it as an attachment instead.)[attachment=0:1aklcpau][/attachment:1aklcpau]

  • On Sprite2 -- On Collision with Sprite3

    ----SubEvent conditions ---------System Set Collision1 to 0

    Score Rotate 180 Degrees clockwise

    You will also have to properly position the text so it doesn't move all around.

  • here you go, I centered your text on the options and also changed the text hotspot which is the equivalent to image point.

    Then at the beginning of the layout I set position to the container sprite.

    Hope that can help you.

    https://www.dropbox.com/s/f8vawehlgp3r6x7/Test%20parallax_2.capx?dl=0

    cheers

  • will this do

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks a lot for helping, but maybe I explained my problem wrong, I'm sorry =S

    The thing that is annoying me is that when the angle of the layout is equal to 180, the text doesnt follow the blue rectangle (wheras it does when the angle of the layout is equal to 0). It seems the parallax is working in reverse for text, but working good for the blue rectangle sprite..

    I just dont understand why it does that.

    You can see that by jumping on the platforms on the right, on the .capx

    But still thanks for the text rotating thing.

  • Most welcome

  • So, I fixed the problem using a spriteText

    ~if someone know the differences between text proprieties and sprite proprieties (and why it's not reacting the same to a parallax equal to 0 ) I'm still wondering though.

    Thanks everyone! <3

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