Life bar and Parallax

Get help using Construct 2

Post » Sat May 21, 2016 11:58 am

Hello guys,
well i have a little problem with the parallax parameter when i introduce a life bar. The problem is when i put 0 in X parameter all its OK (If we ignore that the life bar go down when I jump) but not with Y parameter because the lifebar disappears and i don't have idea what can be the reason.
B
3
Posts: 3
Reputation: 175

Post » Sat May 21, 2016 12:43 pm

Put the life bar on its own on a new layer above everything else and give that new layer a parallax of 0,0 :)
Image



Coming soon on Steam!
B
16
S
9
G
3
Posts: 209
Reputation: 3,476

Post » Sat May 21, 2016 12:50 pm

i do this but dont work, when i put the Y parameter in 0 the life bar disappears, I don't have idea of what is the problem :(
B
3
Posts: 3
Reputation: 175

Post » Sat May 21, 2016 12:52 pm

Probably you just haven't put the life bar in the right place. It needs to be somewhere in the top-left of the layout, within the area marked by the ------- dotted lines. If you can post a .capx I can have a look for you :)
Image



Coming soon on Steam!
B
16
S
9
G
3
Posts: 209
Reputation: 3,476

Post » Sat May 21, 2016 2:05 pm

X y parallax of the layer must be to x 0 y 0 if u deisable only y that means parallax will still happen on X axes just wont happen on Y ... so you need to disable both axes for it to work.

if you cant manage it ... set the position of the hud to ViewportLeft(0)+300 ViewportTop(0)

layer its the layer,(can take names "layer1" or direct value of your layer (from 0=the bottom position top any number you have that is greater then other layers you might have above)), you want doesn't matter the viewport applies to all anyway... its not like you have 2 viewports.
B
78
S
23
G
69
Posts: 1,354
Reputation: 44,027

Post » Sat May 21, 2016 2:18 pm

Create new layer called 'TOP'
in layer list drag and drop this new layer on top of list
set paralax 0,0

in game editor pick life bar and change his layer in properties
B
113
S
29
G
48
Posts: 1,883
Reputation: 36,580

Post » Sat May 21, 2016 2:25 pm

You could also anchor it.
B
46
S
20
G
9
Posts: 545
Reputation: 9,315

Post » Sat May 21, 2016 3:33 pm

Gamecorpstudio.

Who i can set the position of the hud with these parameters

Sorry, im not english speaker so i have little problems to understand all you say guys

I can post the .capx if isn't work. All the game is work for class, so lot of thanks for our attention guys!
B
3
Posts: 3
Reputation: 175


Return to How do I....?

Who is online

Users browsing this forum: jojomickymack, LogoGuy2017, pegasus6464 and 25 guests