Friday Night Funkin Health Bar

I’m trying to make a health bar (When every note gets hit the health goes up when missed goes down), but it doesn’t work. Anyone else having luck trying?

1 Like

I cannot help as I am on my phone right now, but @ManiacPumpkin and @CodeAlpaca are good at those mechanics.

3 Likes

This is what I would do;

  1. Extract the Y position of the uncolored arrow
  2. When an arrow key is hit, use a Proximity to find the nearest arrow (For example, for the uncolored up arrow, when the “up arrow key” is hit, use a proximity looking for the Closest colored up arrow)
  3. Use the Y position that the proximity outputs to see if the Y position from the uncolored arrow is within a few pixels (You could make it exact, but that would be very hard for the player)

Note: Using a Message would not work because sometimes there are multiple of the same arrows on the screen at once. (You could filter through the message, but I figured this would be the easiest method)

3 Likes

How do you extract the Y Position?

1 Like

Under Properties there is a block labeled Extractor. By default, it will be set to “This X”, but if you click it you will be able to change it to “This Y”

2 Likes

Alright Then! Ill Try That!

2 Likes

I dont Know if you have premium, but I dont see the option to change the axis to Y. I clicked the left arrow, clicked advanced and under the properties there wasn’t a change axis button

1 Like

There is a code block called extractor to do so. It is not in the player settings. It’s in the block grouping called “properties.”

1 Like

If you can could you send a quick video of how to do it because im confuzed?

1 Like

I see. Found it TYSM

2 Likes

I think I did what you asked me to do, but it doesnt work and I think I did something wrong because it kind of confused me.

2 Likes

I’ll check it out

2 Likes


What that expression does is make sure that the value is positive.
If the “Pass” output activates then the player was got the point.

3 Likes

Alright I hope this helps Thanks for the help!!!

1 Like

It looks like its working! Should I do it with the rest?

2 Likes

Yes, you would need to do this with all the uncolored arrows

3 Likes

Will it also get the health Bar working?

2 Likes

If you connect the “Pass” output to a message you can tell it to raise the health, and the “Fail” output can be connected to another message telling it to lower the health


Note: You could also use a Global, but an important thing to remember is that Globals do not reset between levels

3 Likes

What do you mean by that?

2 Likes

Also I finished making the arrow thing and im not sure if i did the pass and fail correctly could you check it real quick (its on left arrow)

1 Like