Your videos are so fast but so descriptive. You don't just use "code talk" you explain it in lamens terms. All the meanwhile, making the tutorials about 2-3x shorter than your average Brackeyes tutorial. Keep it up, amazing videos! They help me a ton!
@BMoDev3 жыл бұрын
Really cool to hear this, thanks!
@TegridyMadeGames3 жыл бұрын
@@BMoDev i made a free game coming to steam soon using your 5 min pong tutorial too xD No, thank you!
@Mccev_Roric5 ай бұрын
@@BMoDev I don't know why, but the enemies don't hurt my player. I used debugs to find that the game knows the objects are colliding, but the enemies still don't hurt the player. Here are the scripts: 1: "EnemyDamage" public class EnemyDamage : MonoBehaviour { private void OnTriggerEnter2D(Collider2D collision) { if(collision.tag == "Player") { var healthComponent = collision.GetComponent(); if(healthComponent != null) { healthComponent.TakeDamage(2); } } } } 2: "PlayerHealth" public class PlayerHealth : MonoBehaviour { public float currentHealth; public float maxHealth; public void TakeDamage(int amount) { currentHealth -= amount; if(currentHealth
@thediodoin10002 жыл бұрын
Thank you so much! this was the only tutorial video for health system that would work thank you for making this video it helped me so much and saved alot of tears
@deadbroadcastpc3 жыл бұрын
I like your explanation man, very entertaining
@IceCream-sb7lc3 жыл бұрын
That intro, I now want some pineapple.. and health care. More importantly pineapple though lol. Solid tutorial BMo!
@BMoDev3 жыл бұрын
🍍 rum & pineapple is the truth #trust
@amandacollins73923 жыл бұрын
3 pineapples a day keeps the doctor away ;) I understand health now!
@BMoDev3 жыл бұрын
Thats right, stick with me I'll show you the truth
@lightningcode11363 жыл бұрын
Yes! I could not find this in a Brackeys tutorial
@xioned3 жыл бұрын
That was so quick and awesone ACTUALLY ! I was looking for simple health system for so long and this showedup. :'''''') Thank you .You are a life saver.Good luck and bring us thanos just kidding.Bring us more videos like this
@BMoDev3 жыл бұрын
Awesome, glad it helped out!
@LordBinzVR3 жыл бұрын
Simple and easy. Excellent tutorial!
@ASTARH Жыл бұрын
hey i know im 2 years late but what is a health component
@eileeng24923 жыл бұрын
Great! Examples so good!
@BMoDev3 жыл бұрын
Thanks! 😃
@KagamiFr3 ай бұрын
BRO I LOVE YOU SO MUCH
@wstevegaming5933 жыл бұрын
Why do the arrows kill him if he's wearing full plate
@lordkakabel763 жыл бұрын
I died... laughing! 😂
@uncyan3 жыл бұрын
your video is very Easy to understand so I wish there were Korean subtitles. cuz im korean
@BMoDev2 жыл бұрын
Me too, if i ever make real money off the channel ill invest in subtitle translators
@akizuki29712 жыл бұрын
just came here from watching a video on the same subject by a 250k sub channel..... yours was better by a large margin. You actually explained what you're doing and i appreciate that. Thanks!
@BMoDev2 жыл бұрын
Wow means alot. Thanks!
@dkordy3 жыл бұрын
Great,but all of you with knowlege saying just like that,its simple like that or somthing...That word"JUST" It hurts,for complete beginers like me,nothing is not "JUST" NObody is born with knowlege... but compare to others you r sooo cool and i thank you for this tutorial...thanks
@BMoDev3 жыл бұрын
Its all attitude, programming is 90% frustration, 10% elation. Approaching problems as simple hurdles will do much for your long term interest in programming.
@andrewislastyear11183 жыл бұрын
Best prequel
@oedhelsetren2 жыл бұрын
Something I've tried is not creating add and subtract methods. All methods are additive, the values can be negative.
@macaaris10183 жыл бұрын
Pineapple 🍍😂 what an example 😂😂
@BMoDev3 жыл бұрын
Lol made sense to me 🤷♂️
@revmatch6r3 жыл бұрын
Better hope I'm not around when you only have one pineapple left ⚰
@BMoDev3 жыл бұрын
😤😤
@shidou238011 ай бұрын
im so confused, it has part or can follow from one video tutorial?
@jappyproductions44293 жыл бұрын
I get an error that says: ‘Health.TakeDamage(int)’ is inaccessible due to its protection level. Why is this? Edit: I fixed this by changing the void takedamage to public
@BMoDev3 жыл бұрын
Nice job figuring it out!
@FrostyDH2 жыл бұрын
@SynthWave Dave I followed the tutorial and got it working fine. Seems like you're a little incompetent
@ProdbyHway Жыл бұрын
@@FrostyDH 😂😂 ur mean
@macaaris10183 жыл бұрын
Great video 👍
@BMoDev3 жыл бұрын
Thanks 🙏
@hologrammaster24682 жыл бұрын
THANK YOU
@bigp0y3 жыл бұрын
What happened, Bmo? 3 pineapples max? Shame Great vid btw
@BMoDev3 жыл бұрын
Lets see you do better 🙄
@AdversaryOne3 жыл бұрын
Would there be a tweak in the script if I wanted a segmented health bar? Or would that all be done through the editor and art program (photoshop)?
@THEWHITEGLOW078 ай бұрын
people: use this to make health bars... Me: Uses this to make a spam button...
@ellaroselyn49092 жыл бұрын
My health bar doesn’t show up when i press play? I have a main menu too. Help?
@NoobNoob11037 Жыл бұрын
i typed out everything you did but it says that the comands i typed out are out dated. what do i do
@GGFallenWarrior2 жыл бұрын
Can you make a video on how to make a stamina bar?
@someonewithbadgrammer6740 Жыл бұрын
Can i get Farcry or Tarkov style healing system? It would be really cool you know.
@rahulvyas4020 Жыл бұрын
How would you do it if the death animation transition is in any state? And there is a parameter that Health If reaches zero, it should trigger the death animation? In a 3D game. I'm stuck at coding for health
@BMoDev Жыл бұрын
You could check in code if your health is 0 and then do something like animator.Play(deathAnimation.name) Where deathAnimation is an AnimationClip variable
@GamingGables2 жыл бұрын
Not sure why, but my health bar goes down when I manually change my current health in the inspector. However, when using the OnTriggerEnter2D method the current health value still goes down, but the health bar image doesn’t actually change. Anyone know why this might be?
@ZotaEdits Жыл бұрын
it doesnt show the max health and current health below the script even though i entered it properly
@SilverSwordCreative Жыл бұрын
I had the same problem, make sure to add a semicolon wherever he does.
@Aether24110 ай бұрын
How wpuld you add a hurt animation, like if you take damage and your're not dead. Send help
@BMoDev10 ай бұрын
Id add an animation to my animator and tell my animator to play it when my players health is reduced
@Aether24110 ай бұрын
Thanks yo
@animesongs3992 Жыл бұрын
im getting null refence error on collision
@DoxX069 Жыл бұрын
what is the healthComponent though
@acrow49698 ай бұрын
it did i was haing trouble cause i didnt know howto make it so other scripts could dmg their tarwgts i though t y was abig deal wiith tags and things
@acrow49698 ай бұрын
i reallize i have no context for "it did" you said "did that clear it up", it did... sorry
@barghest87633 жыл бұрын
what extension did you use for untiy game on vscode?
@isitsou3 жыл бұрын
Great video, very helpful! I would like to ask something. When you take the "health component" of the collision at kzbin.info/www/bejne/rH-vZYqPnNuqmpo you assign it on type "var"... why is that? shouldnt you have assign it as type of "Health"??? I am new to this and I try to understand what-goes-where... thanks again for the video!
@김지훈-g2d2t3 жыл бұрын
There is no specific reason for using var. You can use var any time that the initialization of the variable clearly tells what the variable will contain.
@blairmoore44243 жыл бұрын
Please do respawn
@Cleevor2 жыл бұрын
lol
@subwaye3 жыл бұрын
first
@BMoDev3 жыл бұрын
Mac Aaris beat you 😞
@syedmoin79393 жыл бұрын
@@BMoDev can you mobile fps tutorial
@sansunnec Жыл бұрын
had a streak for about 1 year... thy. u lost!
@sajjadbaradaran63072 жыл бұрын
So I have a TakeDamage() function just like yours. At the moment I'm using this function to scale down my Fill (health bar UI image). I also have four different GameObjects, each with a Collider, and an OnMouseDown function which returns { this.Collider.isTrigger = true; }. Let's say that I want all four GameObjects to be clicked (in my case, since the game's a mobile game, touched) and after they're clicked, apply TakeDamage(). So I have created another script and attached it to an empty game object, and in it, I called all the GameObject.Colliders.isTrigger and put them in an If() statement like this: public void FixedUpdate() { if(GameObject1.Colliders.isTrigger && GameObject2.Colliders.isTrigger ... == true) { TakeDamage(20); } } but whenever I run the program, instead of reducing only 20 from health, and show currentHealth as 80, it completely reduces the currentHealth down to 0! Basically, TakeDamage Works, if I'm using an If statement with a parameter of input.KeyDown function in Update, but if I use a bool in the If statment's parameter (like the example above), it doesn't work as it is supposed to. Can you help me?
@HornyAxolotl2 ай бұрын
I know its been over 2 years but while doing this I had the same error instead of doing a void in the health.cs just make it public like this: public void TakeDamage(int amount) { currentHealth -= amount; if(currentHealth maxHealth) { TakeDamage(amount); } } and now you can edit it from other scripts
@DeathIsSelf Жыл бұрын
players current health does reset between playtests (and keeps last playtest value). but when the player get hit the value of currentHealth goes back to last playtest. any ideas?