Fascinating! I came back to this tutorial because I wanted to double check how to make a neat healthbar and if anyone is following this tutorial in 2022 and wondering why they're encountering strange squashed and stretching issues despite following everything it's probably because you didn't change the image type and brackey's doesn't seem to need to do this in this version of Unity. For a horizontal bar, change the image type from simple to fill, then left to right for the direction, that should fix the behaviour, if you have the fill image connected to the slider component then the value in the image will be disabled and it will give you a notice that it's connected to the slider component.
@@randomakatsukipr4570 Have you double checked that you've declared everything properly in the code? I'll need to check because I don't use those kinds of components often but they may have changed it again.
@@mumr1ken Hello! I know this is too late but if you still did not found it and just rolled with how it is , here is the fix: You just need to add a source image! You can open your preffered photo editor and create a blank white png. Then you add it and you can choose image type afterwards.
One of the best intros, I love how you used examples from other games to show that this basic code and setup is basically used in EVERYTHING, just animated, drawn, and colored differently!
Thank you brackeys! You have left us but your knowledge and wisdom we will never forget thank you for inspiring and teaching a generation of game devs and teaching them the code the basic some intermediate and complex stuff as well
Hey Brackeys I just love this kind of videos where we can reuse this thing in all our own games ( like the menus videos, awesome) PLZ make more of this, great content thanks
that's great, but even something as simply as copying the code from his screen word-for-word is a great learning experience, and helps you understand the code you're using more. Just, unless you're in a rush, try not to copy/paste!
Really nice tutorial here are some notes for others: To reduce "random" problems set your currenthealth = maxhealth in awake() not start(). That way if you do check stuff with help in the update function there will never be "random" problems with it. Also takeDamage function should never reduce below zero! Catch that as well with a simple if(currenthealth < 0) currenthealth = 0; This could result in UI problems otherwise. The render with the UI on world is happening because you scaled down the canvas to 0.01 i think. If you just lower the width and height and then scale it to like 0.2 it will be more crips i guess :)
Thank you so much Brackeys, I looked at other tutorials for over an hour before coming to yours and always ended up confused but you made everything simple and easy to integrate. Thanks so much.
Even when I know how to make a proper health bar, this taught me so much for example the gradient. I wanted to make something like this with coloring sprite under void update but this is so much comfortable. Also the billboard script is so useful. Really good tutorial
Great tutorial that hit on all the dangling questions I had when watching other tutorials. You seem to know exactly what a noob would ask about. There were two things I had to figure out though... one was how to stop the HealthBar from rotating around the parent object when it rotates, and then how to get the ui to show over the player and enemies.
Perfect tutorial i needed for my health bar to work. got it to work fine. Now im gonna search your playlist to see if i find anything on enemy interaction that effects the health when my character gets hurt
If you're using Unity 2D and every time you make your character look the other direction your health bar inverts and moves to the other side, just move your canvas so it's under the Main Camera, instead of your character. This means if your camera moves, the health bar moves with it, so it'll stay in the same position.
Oh my gosh guys, a simple thank you would have worked. Funny you have to make corrections in his comment sections and not on your own videos. Thank you so much. I can't believe I just watched a 20 minute video on how to have a health bar, but thank you so much for continuing to add to it until it looked perfect.
@@DeathGOD7 ngl, codemonkey is much better than brackey, clean code, advanced topics and variety of content. I miss old brackeys. Now he just does beginner stuff.
Awesome Videos !!!! For someone, who has to hear everything twice, he is the perfect Teacher! BTW now you have to write Health instead of HealthBar ;) THANK YOU FOR ALL THE VIDEOS U MADE!
PRO TIP for anyone that wants a vertical health bar flip your sprite 90 degrees before importing to unity, follow tutorial then before adding the slider to health bar rotate health bar by 90 degrees. This should trick Unity into changing the fill to move up to down :'D
Another way to position the health bar on the player would be to use just one canvas for all health bars. The canvas should be in "Screen Space - Camera" mode with about 0.01 scale. In this way, the health bar will always face the camera. You just need a script to update the position of the health bar to the desired one in world space. Benefits: - Only one canvas for the health bars, independent from the player object. - Easy to control all health bars. - No need to rotate health bars.
Brackeys thank you for making us these decent quality vides, I hope to see you guys grow as a company/team whichever is correct. Your tutorials always gets me going in the right direction, cheers for that! Have a nice day :)
this is really useful and all but how do i make it go down when the hitbox connects with another hitbox with an 'enemy' tag? im very new to programming and still using videos for everything.
If anyone else has the issue of the images in a canvas not showing up, try scaling the size of your sprites and backgrounds up to match the huge size of the canvas! It turns out the Unity canvas cannot render past a certain point of smallness. I didn't realize my images and background sprites were so small! Hope this helps the next person who's wondering why their health bar seems to be invisible XD
I'm kicking myself now. I made a health bar a couple of months ago and figured out the gradient thing on my own, but I went through this whole complicated thing of scaling the health down to the 0 - 1 range (health/maxHealth) so it would work with the fill settings along with all sorts of masking tricks. I never thought of using a slider, and I didn't realize the slider min and max could be set. If you would have made this video sometime last year it would have saved me a bunch of complexicated calculationing.
I have a problem, the health bar works perfect with an enemy, but when I create another type of enemy and copy the health bar and of course change the life points of the newest, the new bar never moves when the enemy takes any damage. Only works with the original, the enemy even dies when health reach 0, but the health bar never moves.
Use booleans for conditions in a manager script . Make another script for the floor and write whatever you want to happen in a function there. Make an array of the floor class object and assign it's values in the inspector. If conditions meet call the functions in each array element
what about when you have multiple enemy objects and want to display their HP bars simultaneously ... (like in warcraft) .... will we have to make and adjust canvas for each of those objects?
Hey Brackeys, Great video, very informative, and I definitely learnt an extra thing or two. Using render scaling to fix that issue might not be the best idea though, especially in terms of performance as it also renders everything in the game at a much higher resolution and may lead to lower FPS. What I've been doing in my game is a bit more complicated, but I'm using a Screen Space Overlay Canvas setup, and then using WorldToScreenSpace on the game object , and then using a vector 2 variable of canvas.sizeDelta / (camera. pixelWidth, pixelHeight) to multiply that with. Anchor your UI element to the bottom left of the canvas, and it should work perfectly fine. not sure if that's a better way to do things, but I feel it's better than increasing the render scale
Honestly, instead of setting maxValue of the slider, I use ratio currentHealth/maxHealth. This way you can also use unconventional meters, like a Heart shaped meter that fill in Radial 360, or an apple slice in Radial 180, or your meter is a quarter circle in a corner then you can use Radial 90.
Hey Brackey! Thanks for the tutorial, i was blocked with the health bar, but can you one day make a tutorial for a top-down dungeon game ? that would be awessome
Hello The Scripts Give my Error: CS0120: An object reference is required for the non-static field, method, or property 'HealthBar.SetHealth(int)' Any suggestion thanks :)
This works fine and when i hit space it reduces health value each time. However also in play mode i can't actually see the healthbar, icon or border at all. It only appears and works just as shown in edit mode.
It's a good tutorial but... how about those health bars that will show how much damage it takes on the bar with a different color area, and then the area gradually decreases in size?
ua-cam.com/video/THnivyG0Mvo/v-deo.html watch at 5 : 25 he explains how to damage or TakeDamage you can ofcourse use the same script on your player too
I'm making a 2D game and instead of pressing the space bar, if you want to take damage when you touch an enemy do, void OnTriggerEnter2D(Collider2D other) { if (other.CompareTag("Enemy")) { TakeDamage(20); } } Then create a tag for the enemy called "Enemy" and it should work. If you want to do this in 3D just remove the 2D from OnTriggerEnter2D and (Collider2D other)
@@HalcyonVoid brackeys used health Bar as it is the name of the first script he wrote. If you didnt name your script healthBar, you will have to change it to the name of your first script. e.g. public HealthBarScript healthBar; [Healthbarscript for me NOT healthBar] void Start() { currentHealth = maxHealth; healthBar.SetMaxHealth(maxHealth); }
If you can't drag the bar images into the source image section of the image at 3:25, make sure they are imported as sprites. Right click on the bar or heart -> properties -> Sprite (2D and UI). this will allow them to be used as sprites.
@@joechristo2 i just downloaded the Project, got the Scripts out of the scripts folder and got the "Player" and the "HealthBar" Scripts. But i just cant drag the Helath Bar object in the slot. The solt exists
Okay I figured out what I did wrong. I moved the file location of my HealthBar script, manually, into the folder containing the Player script. After doing this, I was getting an error in Unity with my HealthBar tab about having some misplaced mono script. Then you just drag the healthbar script from your assets back into the "Script" option. Hope this helps.
10:17 I cant drag the Health bar object into the the slot of the playerscript. just shows the sign that its not possible, any clues? :( edit: fixed it. i forgot to add the HealthBar script to the Health bar object first :) thanks for the tut!
Hey Brackeys, Assuming you have been with contact Dani (found out from his Discord server) it would be a very funny and entertaining video for you and Dani to do a collab or a project together. Just saying, not forcing you to.
@@BishalKhan01 look at anyone of dani's tutorials. Lets say he doesn't know how to make an fps controller, (as shown in his first 3d game video) he would look up a Brakeys how to
You'd get mouse cords when over pack ui element, get item backdrop data (just use xy) then start from mouse point - 1/2xy offsets to center item and set each pack square as potentially occupied. If all squares underneath unoccupied place item.
Cajus Lehmann I’m fairly new to coding and I’m literally using tutorial videos for every feature of my game, so I wouldn’t know how to turn that into code. I’m hoping these videos will make me better at coding though
Use a trigger area around the enemy and in script you use an event to call a function in the player to lose health. Remember you can pass variables using the eventsystem.
Top 10 intros
Hey Dani big fna
Hi dani boy
hi dani
Dani love your vids . Can you upload more?
Hey Dani, could you make a tutorial on 2d ragdolls and the movement cause I can't find any other tutorial that isn't garbage.
His sense of humor is questionable.
And it's perfect for a developer
Jobs done!
Yup
LOL hilarious devs are not to be trusted
@@CabVideoz dani in the corner:
Brackeys in 2014: sounds really tired
Brackeys in 2020: sound like the most energized man alive
He is aging, just backwards
because of quarantine
GamerulRoman what bout 2019
datarioniboii y
datarioniboii interesting
I will miss Brackeys, I hope you come back someday, you magnificent beast.
🥺
Why u saying "beast" lol
@@sillicon8227 4 months late
@@ECSOrder66 2 months late
@@bastiaantheboss4976 3 days late
2:06 (a game jam) is a great way to challenge yourself in a stress-free environment
??? am i doing game jams wrong ?_?
lol
the environment might be stress-free but not you! :D
Ill let *you* decide...
... but the answer is yes xD
O_O
yes.
Fascinating! I came back to this tutorial because I wanted to double check how to make a neat healthbar and if anyone is following this tutorial in 2022 and wondering why they're encountering strange squashed and stretching issues despite following everything it's probably because you didn't change the image type and brackey's doesn't seem to need to do this in this version of Unity. For a horizontal bar, change the image type from simple to fill, then left to right for the direction, that should fix the behaviour, if you have the fill image connected to the slider component then the value in the image will be disabled and it will give you a notice that it's connected to the slider component.
Did you run into any problems with the gradient? Every time I try to click on it, the hub for the gradient does not appear. Can anyone help with this?
@@randomakatsukipr4570 Have you double checked that you've declared everything properly in the code? I'll need to check because I don't use those kinds of components often but they may have changed it again.
Hey! Where do I change the image type "from simple to fill"? Cant find it in my settings
@@mumr1ken Hello! I know this is too late but if you still did not found it and just rolled with how it is , here is the fix: You just need to add a source image! You can open your preffered photo editor and create a blank white png. Then you add it and you can choose image type afterwards.
You can also set the Image Type to "Filled" and set the progress there. This also allows for example round shapes, circles, etc.
oh u here!xd
@@SweetVibesOfficialMusic you here too!
holaaaa
Yes that was a better way...i wonder why he won't do that..just its not seem sense to me we have a canvas in each character
OMG My Idol
One of the best intros, I love how you used examples from other games to show that this basic code and setup is basically used in EVERYTHING, just animated, drawn, and colored differently!
Thank you brackeys! You have left us but your knowledge and wisdom we will never forget thank you for inspiring and teaching a generation of game devs and teaching them the code the basic some intermediate and complex stuff as well
Hey Brackeys I just love this kind of videos where we can reuse this thing in all our own games ( like the menus videos, awesome) PLZ make more of this, great content thanks
hi, i think this video is really worth it :)
that's great, but even something as simply as copying the code from his screen word-for-word is a great learning experience, and helps you understand the code you're using more. Just, unless you're in a rush, try not to copy/paste!
69 nice
I've only been learning coding for about like 3-4 days and this coding is already starting to look easy to understand.
That's good, when i started coding i had no idea what i was doing until about 2 weeks later.
I have to say, I miss your tutorials, I'm watching this right now and I had such a good laugh, I'm in a great mood to learn
always releasing tutorials when I most need them
Your ability to speak and smile at the same time amazes me!
Really nice tutorial here are some notes for others:
To reduce "random" problems set your currenthealth = maxhealth in awake() not start(). That way if you do check stuff with help in the update function there will never be "random" problems with it.
Also takeDamage function should never reduce below zero! Catch that as well with a simple if(currenthealth < 0) currenthealth = 0; This could result in UI problems otherwise.
The render with the UI on world is happening because you scaled down the canvas to 0.01 i think. If you just lower the width and height and then scale it to like 0.2 it will be more crips i guess :)
Thank you very much
Thank you so much Brackeys, I looked at other tutorials for over an hour before coming to yours and always ended up confused but you made everything simple and easy to integrate. Thanks so much.
Even when I know how to make a proper health bar, this taught me so much for example the gradient. I wanted to make something like this with coloring sprite under void update but this is so much comfortable. Also the billboard script is so useful. Really good tutorial
The amount of stuff I have learned and actually used in my games from Brackeys is insanity !!
Great tutorial that hit on all the dangling questions I had when watching other tutorials. You seem to know exactly what a noob would ask about. There were two things I had to figure out though... one was how to stop the HealthBar from rotating around the parent object when it rotates, and then how to get the ui to show over the player and enemies.
and how did you do it?
Having the project files is a life saver!
Perfect tutorial i needed for my health bar to work. got it to work fine. Now im gonna search your playlist to see if i find anything on enemy interaction that effects the health when my character gets hurt
If you're using Unity 2D and every time you make your character look the other direction your health bar inverts and moves to the other side, just move your canvas so it's under the Main Camera, instead of your character. This means if your camera moves, the health bar moves with it, so it'll stay in the same position.
not such a good idea if your character moves and the camera doesn't :/
just make the canvas above the transform of the player no need to attach it to the player itself
This is the first tuto I can follow entirely.
Oh my gosh guys, a simple thank you would have worked. Funny you have to make corrections in his comment sections and not on your own videos. Thank you so much. I can't believe I just watched a 20 minute video on how to have a health bar, but thank you so much for continuing to add to it until it looked perfect.
Finally a Health Bar tutorial
Kalpact right
Code monkey had done it before FYI, if you had searched in YT or google
David Lad r/woooosh
@@DeathGOD7 ngl, codemonkey is much better than brackey, clean code, advanced topics and variety of content. I miss old brackeys. Now he just does beginner stuff.
There are much better ones out there.
When I saw that he was working with a rotating camera, all I thought was "that's quirky."
Now I understand
Yes!! I can't wait for the game jam, I had a blast during the last one😆
Its just so sad that he stopped but I respect that. May god bless you brackeys and best of luck
i agree sad ngl
Dude yesterday I was searching on UA-cam about health bars what a coincidence!
Google tracks your searches and history to reccomend videos
Awesome Videos !!!! For someone, who has to hear everything twice, he is the perfect Teacher!
BTW now you have to write Health instead of HealthBar ;)
THANK YOU FOR ALL THE VIDEOS U MADE!
I needed this tutorial, and I noticed it was posted exactly 1 year ago from now (today is feb 10 2021). RIP BRACKEYS WE MISS YOU!
Is it just me is this health bar looking kinda *THICC*
0:00 Worst best joke
PRO TIP for anyone that wants a vertical health bar flip your sprite 90 degrees before importing to unity, follow tutorial then before adding the slider to health bar rotate health bar by 90 degrees. This should trick Unity into changing the fill to move up to down :'D
Thanks for this! I'm surprised by how simple and easy to use the Slider is. Also the Canvas world space stuff is super useful!
Another way to position the health bar on the player would be to use just one canvas for all health bars.
The canvas should be in "Screen Space - Camera" mode with about 0.01 scale. In this way, the health bar will always face the camera. You just need a script to update the position of the health bar to the desired one in world space.
Benefits:
- Only one canvas for the health bars, independent from the player object.
- Easy to control all health bars.
- No need to rotate health bars.
Brackeys thank you for making us these decent quality vides, I hope to see you guys grow as a company/team whichever is correct. Your tutorials always gets me going in the right direction, cheers for that!
Have a nice day :)
Well....
You are the Best Unity Tutorial Maker in the whole World!!!!!!
Its my holiday now and the jam is next week.
Which jam?
@Kommen Tiere wenn ich kommentiere ? Thanks
@@abcd-xyz-123-n5g Brackeys jam
I always come back to this video for reference, so I can't believe I only just realized I haven't pressed the like button yet.
this is really useful and all but how do i make it go down when the hitbox connects with another hitbox with an 'enemy' tag? im very new to programming and still using videos for everything.
Missing Brackeys in 18-05-21. unparalleled knowledge and humour!
If anyone else has the issue of the images in a canvas not showing up, try scaling the size of your sprites and backgrounds up to match the huge size of the canvas! It turns out the Unity canvas cannot render past a certain point of smallness. I didn't realize my images and background sprites were so small! Hope this helps the next person who's wondering why their health bar seems to be invisible XD
I'm kicking myself now. I made a health bar a couple of months ago and figured out the gradient thing on my own, but I went through this whole complicated thing of scaling the health down to the 0 - 1 range (health/maxHealth) so it would work with the fill settings along with all sorts of masking tricks. I never thought of using a slider, and I didn't realize the slider min and max could be set. If you would have made this video sometime last year it would have saved me a bunch of complexicated calculationing.
I have a problem, the health bar works perfect with an enemy, but when I create another type of enemy and copy the health bar and of course change the life points of the newest, the new bar never moves when the enemy takes any damage. Only works with the original, the enemy even dies when health reach 0, but the health bar never moves.
just reminding ya'll that brackeys is a legend
Can u do like a Tile Turnip effect,from Pvz 2,like when u meet a special requirement,2 or more
things on a special floor will activate
Use booleans for conditions in a manager script . Make another script for the floor and write whatever you want to happen in a function there. Make an array of the floor class object and assign it's values in the inspector. If conditions meet call the functions in each array element
@@vegitoblue2187 true,but i want to see how brackeys do it :)
I spent HOURS making my health bar, so it can be resized and still work, and now I finally give up, and find this?
Nice tutorial btw.
By any chance do you know how to make it so the health bar goes down if the player hits an (enemy)
what about when you have multiple enemy objects and want to display their HP bars simultaneously ... (like in warcraft) .... will we have to make and adjust canvas for each of those objects?
Thanks for your help, Brackeys! Because of you, I'm slowly becoming a mildly impressive game designer!
0:44 That's a mod from WC3 called Winter Maul Wars.
Is there a WmW fan at Brackeys? :D
Has anyone else noticed that Brackeys has been stuck at 900K for like a year now, they just need 30K more subs
At 10:09 the "public HealthBar healthBar" could not be found even tho I've done everything he's done in the vid. Can someone please help?
i have the same have you found the solution?
Me too...
Same with me
It’s a public slider now, not health bar. Slider is capitalized.
And i fixed it, what comes after "public" it's the name of your health bar script. You might have named it with a different name
Fair play Mr. Brackey. Staying up to all times of the night to show us valuable skills. Really recommend this mad man.
Hey Brackeys,
Great video, very informative, and I definitely learnt an extra thing or two. Using render scaling to fix that issue might not be the best idea though, especially in terms of performance as it also renders everything in the game at a much higher resolution and may lead to lower FPS.
What I've been doing in my game is a bit more complicated, but I'm using a Screen Space Overlay Canvas setup, and then using WorldToScreenSpace on the game object , and then using a vector 2 variable of canvas.sizeDelta / (camera. pixelWidth, pixelHeight) to multiply that with.
Anchor your UI element to the bottom left of the canvas, and it should work perfectly fine.
not sure if that's a better way to do things, but I feel it's better than increasing the render scale
Honestly, instead of setting maxValue of the slider, I use ratio currentHealth/maxHealth. This way you can also use unconventional meters, like a Heart shaped meter that fill in Radial 360, or an apple slice in Radial 180, or your meter is a quarter circle in a corner then you can use Radial 90.
Hey Brackey!
Thanks for the tutorial, i was blocked with the health bar, but can you one day make a tutorial for a top-down dungeon game ? that would be awessome
Here I am two years later, wishing Brackeys was still going :(
Thanks guys!
Hello
The Scripts Give my Error: CS0120: An object reference is required for the non-static field, method, or property 'HealthBar.SetHealth(int)'
Any suggestion
thanks
:)
Myabe check your references in the health bar and your player script.
Yeah I have the same issue did you find a fix?
@@Secretlycat31 no i have not fix it but i will you send a link that it work
@@pilotrl2709 i Think i know ur problem because i just had it too its because of the name and i just saw this is a year later
I’m sorry I didn’t listen to the video, this intro is gold.
"I have achieved comedy"
Brackeys, never stop making tutorials plzz u r the only person with these amazing tutorials. U explain really well u r the BEST ❤❤❤❤❤👏👏👏👏👏
sadge
Aged like milk
This works fine and when i hit space it reduces health value each time.
However also in play mode i can't actually see the healthbar, icon or border at all.
It only appears and works just as shown in edit mode.
Check the z value in the transform.
there's so much gold in these videos...
It's a good tutorial but... how about those health bars that will show how much damage it takes on the bar with a different color area, and then the area gradually decreases in size?
make two sliders with different values
But how to adjust the speed? It may be too slow or too fast for the second slider...
@@joshuazollner2995 Thank you!
I've only recently picked up the hobby, but you know what? I'll join the game jam anyway.
alright, got the health bar, but how do I take damage when an enemy attacks instead of when pressing a button? been having trouble with that aspect.
ua-cam.com/video/THnivyG0Mvo/v-deo.html
watch at 5 : 25 he explains how to damage or TakeDamage you can ofcourse use the same script on your player too
why cant i see the reply
Hey man , I only want to say THANKS for everything , you are helping me a lot
When I learn C# Im going to start my own tutorials :D
Kretencuga Neve give up!
Good luck :D
Best Unity tutorials on youtube!
I'm making a 2D game and instead of pressing the space bar, if you want to take damage when you touch an enemy do,
void OnTriggerEnter2D(Collider2D other)
{
if (other.CompareTag("Enemy"))
{
TakeDamage(20);
}
} Then create a tag for the enemy called "Enemy" and it should work. If you want to do this in 3D just remove the 2D from OnTriggerEnter2D and (Collider2D other)
do i need to give them collider and do I need to do other stuff?
THANKS!!!! i was trying to do this for like 3 hours lol
Oh my god you're a fucking legend. Was looking everywhere for how to do this. Why the hell didn't he just include it in the video???
I'm probably dumb, but u man, i have no words, i have no fucking words for what u have saved my ass, i love you with all my heart
dang, im watching this cause im making a game for a shcool project, and i wouldda been screwed if it werent fo good ol' brackeys. God bless ya, man
the second script didn't work when I tried it, it keeps saying "The type or namespace 'Healthbar' could not be found"
Same here. Ever figure it out?
@@HalcyonVoid brackeys used health Bar as it is the name of the first script he wrote. If you didnt name your script healthBar, you will have to change it to the name of your first script.
e.g.
public HealthBarScript healthBar; [Healthbarscript for me NOT healthBar]
void Start()
{
currentHealth = maxHealth;
healthBar.SetMaxHealth(maxHealth);
}
@@jacobhudson1014 Thank you so much. You have no idea how much you just helped me. You’ve made my day. Thank you
@@jacobhudson1014 omds thank you
If you can't drag the bar images into the source image section of the image at 3:25, make sure they are imported as sprites. Right click on the bar or heart -> properties -> Sprite (2D and UI). this will allow them to be used as sprites.
thanks!!! took so long for me to find :D
Dude I've been scratching my head for the last 30 mins lmao. Thanks so much. I was acc abt to comment asking about that lmao 😅
When my health points are low 🤕 I just watch a Brackeys Tutorial! 💊😃👍
True
I happen to be wearing my Brackeys t-shirt today and this vid just came up in my feed. hope you're doing well!
Hello, i have a question: Y cant i drag my Health Bar into the "Health Bar" Slot? Is it because i am using Unity 2020.1? Please can someone help me
RayCat_LP Is there even a health bar slot there? If not, then make sure that the Health Bar variable is public.
RayCat_LP And make sure to put the name of the healthbar class after public
@@joechristo2 i just downloaded the Project, got the Scripts out of the scripts folder and got the "Player" and the "HealthBar" Scripts. But i just cant drag the Helath Bar object in the slot. The solt exists
I am having the same issue...
Okay I figured out what I did wrong. I moved the file location of my HealthBar script, manually, into the folder containing the Player script. After doing this, I was getting an error in Unity with my HealthBar tab about having some misplaced mono script. Then you just drag the healthbar script from your assets back into the "Script" option. Hope this helps.
You are SO close to 1 million subs! Congrats man! I've been here since your early Unity tutorial days :P
10:17 I cant drag the Health bar object into the the slot of the playerscript. just shows the sign that its not possible, any clues? :(
edit: fixed it. i forgot to add the HealthBar script to the Health bar object first :)
thanks for the tut!
I have the same issue and I'm not sure how to fix it, I checked and everything's where it's supposed to be...I think
Best intro of 2020
Why is every unity youtuber uploading new videos right now? I have to sleep 😂😂
I'll explain, Brackeys lives somewhere else. So it's different Times there.
I see you on every codemonkey and brackeys video
@@aquaarmour4924 because I like both channels :D
you were the best teacher, may you get back
Hey Brackeys, Assuming you have been with contact Dani (found out from his Discord server) it would be a very funny and entertaining video for you and Dani to do a collab or a project together.
Just saying, not forcing you to.
also everytime he needs to figure out something he looks for one of your tutorials, XD
@@cohenschellenberg3325 what do you mean?
@@BishalKhan01 look at anyone of dani's tutorials. Lets say he doesn't know how to make an fps controller, (as shown in his first 3d game video) he would look up a Brakeys how to
@@cohenschellenberg3325 oh yeah true
My plan is to mix a lot of tutorials into creating my 'own' fps shooter game so I can show off to my friends. Thank you Brackeys
16 min late.....Yay..What wanted in my FPS Game
Hostinger is sponsoring every game development channels
Why does his health bar looks HD type and my looks pixelated?
you have to change the filter mode to "Point(no filter)" and compression to "none"
you can do that by selecting your sprite in the assets folder
thanks man your videos have been a really big help with my tight deadline uni project
And the award for the worst joke goes to.... [drums] Brackeys!
Brackeys always helpful.
please do diablo style grid based inventory where some items take up multiple cells and can be rotated
I found this from a quick search: ua-cam.com/video/9xz_kYJZ_zw/v-deo.html
Don't know how useful it'll be for you but there ya go
You'd get mouse cords when over pack ui element, get item backdrop data (just use xy) then start from mouse point - 1/2xy offsets to center item and set each pack square as potentially occupied. If all squares underneath unoccupied place item.
*It's ACTUALLY REALLY SIMPLE!*
The 21 Minute Video: Good Luck Kid
Me still using unity 2018 seeing 2019 ui for the first time: WHAT IS THIS WITCHCRAFT!
Dani and brackeys,
Peter and Mr. Stark
Could you do a 3D grapple hook
Sykoo actually made a pretty cool tutorial on how to make one (ua-cam.com/video/MR1XK-q265E/v-deo.html)
Fact #1 - Brackeys Is A Lifesaver :p
How would I make the player loose Health whenever an enemy goes near it
Cajus Lehmann I’m fairly new to coding and I’m literally using tutorial videos for every feature of my game, so I wouldn’t know how to turn that into code. I’m hoping these videos will make me better at coding though
@@Abazel you should watch brackeys 2D shooting tutorial video.
Genius K would it be good for a 3D fps game
@@Abazel yes sure watch it.
Use a trigger area around the enemy and in script you use an event to call a function in the player to lose health. Remember you can pass variables using the eventsystem.
Awesome video! Wish you best of luck in the future!
when I join a game jam its just like: "so here's a horrible small game cuz I'm bad at coding ._."
Miss you so much brackeys :(