Galactian Health example help

@Galactian I need help with your custom healtbar example. May you please show me how to make the healthbar and frame follow the camera without being in the UI layer? I want to keep the link private for now.

2 Likes

If the player is in the middle of the camera you should be able to extract the player’s pos and use expressions to move it to the corner.

4 Likes

I’m confused

1 Like

Use globals to extract the player pos, then make the bar use those pos and add or subtract them so it moves into the corner.

3 Likes

Ok, I get the global part. But what do you mean by the corner? I’m trying to make it follow the camera but stay still at all other times, like a UI object would.

2 Likes

Oh i just expected that you wanted it to be in the corner. You can put it wherever.

3 Likes

ok

1 Like

Wait its not working

Use expressions to add to it.

1 Like

How?

A+#.

2 Likes

image

Put in the expression A + (the number you need so it goes to the pos you want) then make the pos the A and eval.

2 Likes



I still don’t get it

1 Like

For both positions, add or subtract to them SEPARATELY until you find the correct values.

3 Likes

I’m sorry, I don’t know or get that

use the expression behaviour to add or subtract them separately

1 Like

May you please send a screenshot? I don’t get what to put in the Expressions or anything about them really.

1 Like

I can’t show you what exactly to put in the expressions! I said that twice. You need to put values until it works.

1 Like


It gives me an error