HUD HELP

Get help using Construct 2

Post » Fri Feb 26, 2016 9:53 pm

Hi, I'm making a platform game. The camera follows the player, so when the player jumps, the screen goes up and you see the upper part of the background. I want this to stay. I also have a HUD layer with the score. When the player jumps, the HUD moves too. I don't want this to happen. I want it to always stay at the top left, no matter what. Any suggestions?

Thanks!
B
6
Posts: 17
Reputation: 286

Post » Fri Feb 26, 2016 9:56 pm

https://www.scirra.com/manual/85/layers

Set layer parrallax to 0 for your static layers.
Last edited by oosyrag on Fri Feb 26, 2016 10:10 pm, edited 1 time in total.
Mistakes were made.
B
51
S
25
G
107
Posts: 1,581
Reputation: 60,458

Post » Fri Feb 26, 2016 10:07 pm

The parallax is 0,0. It doesn't help. @oosyrag
B
6
Posts: 17
Reputation: 286

Post » Fri Feb 26, 2016 10:12 pm

How is your camera "moving"? Is it with the scroll to action, or are you moving the objects in your project around?

Are you sure your HUD objects and backgrounds are on the correct layer with parallax 0? You can check in the debugger
Mistakes were made.
B
51
S
25
G
107
Posts: 1,581
Reputation: 60,458

Post » Fri Feb 26, 2016 10:16 pm

I figured it out..it is staying in the same place, but I thought it wasn't because of the changing background. The action is scroll to. Is there a way to not scroll when the player jumps?
B
6
Posts: 17
Reputation: 286

Post » Fri Feb 26, 2016 10:29 pm

Instead of scroll to player.x, player.y, only scroll to player.x, and have y constant.

Or add a condition to check that when player is jumping, then the scroll only scrolls to the x.

There are a lot of little nuances people don't realize with platformer camera behavior! You'll need to add the exceptions and logic yourself for each situation.
Mistakes were made.
B
51
S
25
G
107
Posts: 1,581
Reputation: 60,458


Return to How do I....?

Who is online

Users browsing this forum: lukewasthefish, marc254, Mayfly, tarek2 and 18 guests