HP bar follow screen

Get help using Construct 2

Post » Mon Aug 05, 2013 2:11 pm

noob question how do I make the HP bar follow where my screen is going?.I have have a platform game ,I Tried the Anchor but not satisfied of the outcome, It's following the screen but if I stop moving it moves a bit like law of inertia.

Thanks
B
8
S
3
G
2
Posts: 23
Reputation: 2,076

Post » Mon Aug 05, 2013 2:13 pm

put on a layer and set its parallax to 0
B
18
S
5
G
4
Posts: 568
Reputation: 5,079

Post » Mon Aug 05, 2013 2:22 pm

thanks, at first I don't know where is it.
now I found it, if someone doesn't know where parallax is create a new layer and add the GUI stuff there and click that layer on left panel find the parallax then set to 0,0
B
8
S
3
G
2
Posts: 23
Reputation: 2,076

Post » Mon Aug 05, 2013 2:25 pm

This is explained in the page 7 of the beginner's guide that every C2 user should have gone through at least once.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
278
S
104
G
86
Posts: 7,313
Reputation: 84,296

Post » Mon Aug 05, 2013 11:59 pm

Sorry, I'm still having a problem how do I set the width properly when taking damage. here's my event every tick set width (player.HP/500)*150
this event work but both end of the bar is reducing going to the center.
If I use the anchor only the right bar is reducing which is correct but
the position of the bar is not accurate. If I use the event to position the bar it's hard cause I have this fancy looking life/mana/exp bar :D

Thanks
B
8
S
3
G
2
Posts: 23
Reputation: 2,076

Post » Tue Aug 06, 2013 12:09 am

set the Sprite's Origin Point X to 0
(How: double click the sprite to enter the image editor. Then, Click the last button on the left Panel tool to edit the origin point)
B
18
S
5
G
4
Posts: 568
Reputation: 5,079

Post » Tue Aug 06, 2013 1:10 am


Here's what happen when I use the event width to set its size.
If I use animation it would be too hard. well maybe I'll use the text to temporarily show my hp/mana/exp.
B
8
S
3
G
2
Posts: 23
Reputation: 2,076


Return to How do I....?

Who is online

Users browsing this forum: Kitsune42k, plinkie and 3 guests