How do I make my HUD follow my layoutangle?

Get help using Construct 2

Post » Sat Oct 18, 2014 10:17 pm

Hey!
I'm new with construct2 and basically I just try things :D

So, I have this kind of plateform game and my Layout angle can sometime be equal to 180.
And I have an HUD for score too, made with text and sprite. (I put a Layer with a (0.0) parallax to do that)

It works well with the sprite, when the angle of the layout changes, the HUD sprites are following the player.
...But the score text is just being weird, it seems it's doing a reverse parallax. (when I jump, it goes down instead of going up with me..).

I can't figure why it's doing that thing, specially since it's working perfectly well with the sprites..


I dont know if I express myself goodly.. If you dont see what I mean I could post a demo showing this problem.
Bye everybody and thanks in advance for the ones who will read and help!
B
7
S
2
G
1
Posts: 51
Reputation: 679

Post » Sat Oct 18, 2014 10:41 pm

Always best to post a CAPX.
ImageImageImage
B
71
S
22
G
258
Posts: 3,791
Reputation: 143,198

Post » Sat Oct 18, 2014 11:05 pm

so you can see what it does there.

when You jump, the angle of the layout is changed to 180. The blue rectangle is still following the screen, but the text isn't. (you can go and jump on the platforms on the right to see that)
It's weird since they are in the same Layer.. Can't understand. Any explaination? =)

(edit: oh, I cant post links.. Well I just put it as an attachment instead.)
test parallax.rar
You do not have the required permissions to view the files attached to this post.
B
7
S
2
G
1
Posts: 51
Reputation: 679

Post » Sun Oct 19, 2014 2:50 pm

On Sprite2 -- On Collision with Sprite3
----SubEvent conditions ---------System Set Collision1 to 0
Score Rotate 180 Degrees clockwise
You will also have to properly position the text so it doesn't move all around.
B
43
S
12
G
14
Posts: 488
Reputation: 10,570

Post » Sun Oct 19, 2014 2:58 pm

here you go, I centered your text on the options and also changed the text hotspot which is the equivalent to image point.
Then at the beginning of the layout I set position to the container sprite.

Hope that can help you.

https://www.dropbox.com/s/f8vawehlgp3r6x7/Test%20parallax_2.capx?dl=0


cheers
B
43
S
12
G
14
Posts: 488
Reputation: 10,570

Post » Sun Oct 19, 2014 3:10 pm

will this do
You do not have the required permissions to view the files attached to this post.
B
257
S
42
G
15
Posts: 1,991
Reputation: 41,411

Post » Mon Oct 20, 2014 12:41 pm

Thanks a lot for helping, but maybe I explained my problem wrong, I'm sorry =S


The thing that is annoying me is that when the angle of the layout is equal to 180, the text doesnt follow the blue rectangle (wheras it does when the angle of the layout is equal to 0). It seems the parallax is working in reverse for text, but working good for the blue rectangle sprite..
I just dont understand why it does that.

You can see that by jumping on the platforms on the right, on the .capx

But still thanks for the text rotating thing.
B
7
S
2
G
1
Posts: 51
Reputation: 679


Post » Fri Oct 24, 2014 10:50 pm

So, I fixed the problem using a spriteText

~if someone know the differences between text proprieties and sprite proprieties (and why it's not reacting the same to a parallax equal to 0 ) I'm still wondering though.

Thanks everyone! <3
B
7
S
2
G
1
Posts: 51
Reputation: 679


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 6 guests