UI/Points

0 favourites
  • 9 posts
From the Asset Store
Connect the dots in the correct order and draw happy animals!
  • Hi.

    I have 2 problems: making a UI and displaying the player's points.

    1. I used to use Construct Classic, where making a UI was simple: add a layer for your UI and find an option on the properties bar for that layer to make the layer stay on the screen as you move. But I couldn't find that here. I have part of my UI designed, and I already have a layer for it. Although when you move, you leave the UI behind and it doesn't stay on the screen. How can I fix that?

    2. As part of my UI, I have a text that shows how many points you have. Note that you get more by collecting sweets and finishing levels. I want to have a global variable "attached" to my text so it doesn't keep saying "0 points" through the whole game... but I don't know how I can get the text to display the number of points you have. How can I figure that out?

    Thanks in advance.

    -The Diaper Movie

  • 1 - Your "problem" is parallax, on your UI layer, set parallax to 0% x 0% and it will stay on the screen.

  • Thank you!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That fixes problem 1, but what about problem 2? Even when I used to use Construct Classic I couldn't figure it out. Thanks again in advance.

  • Not to spam, but did you understand problem 2? If not, I can try and help you understand.

  • 2 - OK, I think that the best approach for this is having a function to update both: global variable and the text display.

    So, using this function you just need a trigger..

    - On colision with "sweets: call function Update_Score and don't forget to set the Param(0), Param(0) is the amount of Score that will increase, so, using this function you can have different score for different itens and even when finishing levels.

  • Thanks again! Not to take up any more time but just recently a problem 3 stepped in:

    For my Level Failed, I have a layer. When my player runs out of lives, the layer doesn't show up. I have that layer also (the other being the UI) set to parallax 0% both x and y. I have no idea why it doesn't happen so can you please help? If you need to, I can send a link to the file on Dropbox so you can try it.

    Thanks again.

  • Let me know if you didn't understand.

  • Not to spam more, but I think I found a clue. When I check "Parallax In editor" for my Level Failed layer, the layer completely disappears, even in the editor. Or is that because it's not initially visible?

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