life bar position

Get help using Construct 2

Post » Fri Mar 13, 2015 8:44 pm

Any one have an idea on how to bind a life bar to the top left of a window so that it will follow my player around the layout but stay in the same place in the window? I've tried to pin the life bar to the player and that has not worked so far.
https://www.dropbox.com/s/axht9wy3g6f73 ... .capx?dl=0
B
6
S
1
Posts: 47
Reputation: 759

Post » Fri Mar 13, 2015 8:56 pm

The common way to handle this is to have a layer just for the user interface elements. Then you set the layers parallax settings to 0,0. This will make it so the layer doesn't move while the rest of the layout does.
B
38
S
12
G
11
Posts: 331
Reputation: 7,712

Post » Fri Mar 13, 2015 10:13 pm

thnx
B
6
S
1
Posts: 47
Reputation: 759

Post » Fri Mar 13, 2015 10:15 pm

thnx
B
6
S
1
Posts: 47
Reputation: 759

Post » Sat Mar 14, 2015 12:37 am

Another thing I find useful is the Anchor behavior, which sticks things to the edge of the window. This is mainly useful if aspect ratio changes or something. It's best to combine Anchor and a UI layer so that you don't get juddering in the UI elements.
B
14
S
5
G
1
Posts: 189
Reputation: 1,536

Post » Sat Mar 14, 2015 8:53 am

Just use another layer for your user interface, make its parallax 0,0
B
22
S
5
G
2
Posts: 210
Reputation: 3,377


Return to How do I....?

Who is online

Users browsing this forum: imhotep22, kiko2015, Monkin8r, Yahoo [Bot] and 9 guests