How do I "pin" text over my character

Get help using Construct 2

Post » Sun Feb 01, 2015 2:32 am

Hi everyone,

I want my game to display the fuel units on top of my character. I created a text object, and in the event page I wrote it like this:
Every tick > set "text" position to "Player"(imagepoint 3)
Every tick > set "text" to (Global Variable, in this case fuel_units)

If you go to the pictures you'll see that this display has no problems when stuck to the layer, but apparently when following an imagepoint, after my Player falls for a few pixels then the text falls too, and faster than my character (see picture).

I don't know why this happens considering I used the same every tick > set "SPRITE" position to "PLAYER"(imagepoint 2) and it works, so how come the text falls?

BTW, I tried using the PIN behaviour and it didn't help.
You do not have the required permissions to view the files attached to this post.
B
5
Posts: 38
Reputation: 301

Post » Sun Feb 01, 2015 3:28 am

Did you check to see that your imagepoints are running through all of your animations?

so lets say if your player jumps and you have imagepoints on the jump
and you want the text to follow on the fall animation then you need to apply the imagepoints to that animation.

rightclick imagepoint - apply to all animations

if the imagepoints are not set then the default position goes to the orientation point which im assuming is below your player.

hope this helps
B
5
S
1
Posts: 26
Reputation: 429

Post » Sun Feb 01, 2015 3:39 am

@jaypeps81 it didn't :( for some reason it keeps on falling. I can't make it stay above my character as he falls through the stage. It keeps falling faster than my character.
B
5
Posts: 38
Reputation: 301

Post » Sun Feb 01, 2015 3:50 am

@PixelBoss
Would you be able to share your capx, or recreate the issue in another capx so I could take a look at this issue for you.

I created my own player sprite and set text to image point and it worked perfectly. I couldn't recreate your issue.
B
33
S
8
G
2
Posts: 100
Reputation: 2,635

Post » Sun Feb 01, 2015 4:27 am

I'll pm you the link as soon as I have it ready. Thanks.
B
5
Posts: 38
Reputation: 301

Post » Sun Feb 01, 2015 4:33 am

Message: PixelBoss is not yet permitted to post plain text URLS (300 rep required). 1 URLS removed. Why?
Welp, looks like I can't send you a PM. Here it goes.
B
5
Posts: 38
Reputation: 301

Post » Sun Feb 01, 2015 4:33 am

Hah. Can't even post URLs. I guess I'm S.O.L. for now.
B
5
Posts: 38
Reputation: 301

Post » Sun Feb 01, 2015 4:39 am

Just add a few spaces to "break" the URL.
ImageImageImage
B
71
S
21
G
231
Posts: 3,688
Reputation: 129,352

Post » Sun Feb 01, 2015 4:50 am

url deleted
Let me know if it works.
Last edited by PixelBoss on Sun Feb 01, 2015 4:03 pm, edited 1 time in total.
B
5
Posts: 38
Reputation: 301

Post » Sun Feb 01, 2015 5:15 am

Worked. Your text is on the UI layer, which has a different parallax to the Game layer. Change the text to Game, and it works.
ImageImageImage
B
71
S
21
G
231
Posts: 3,688
Reputation: 129,352

Next

Return to How do I....?

Who is online

Users browsing this forum: Mayfly, R0J0hound, tarek2 and 20 guests