Unity Player Health and Health bar Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 ต.ค. 2024

ความคิดเห็น • 49

  • @t.b.g158
    @t.b.g158 2 ปีที่แล้ว +10

    Bro...How come no one on TH-cam explain Unity Tutorials as simple as you!? I literally found you by an accident while looking through a million video on how to move my character in a platformer way! I can't believe i will witness a great channel like yours grow slowly from the start
    I already know how to make a health bar...But i really should have waited for you it's Alot leas complicated your way
    Edit:I have just realized the 360 Slide from your video thx so much pro❤️❤️

  • @cheery-hex
    @cheery-hex 2 ปีที่แล้ว +2

    thank you muchly!! tried several others but always ran into roadblocks.. yours stuff is super easy to follow! works every time :)

  • @Mintypeets
    @Mintypeets 2 ปีที่แล้ว +1

    1:53 that would have been so usefull back when i made games with unity! i used to spend so much time adjusting the position of my menu buttons and then having to test it out and again and again xD
    very nice tutorial dude!

    • @morebblakeyyy
      @morebblakeyyy  2 ปีที่แล้ว +1

      Definitely!
      Thank you my man👍🏻

  • @ftdtxiace5829
    @ftdtxiace5829 2 ปีที่แล้ว +1

    THANKS BLAKEY! I finally got it to work.

  • @dandidan123
    @dandidan123 2 ปีที่แล้ว +4

    you are the best develeper

    • @morebblakeyyy
      @morebblakeyyy  2 ปีที่แล้ว

      Thank you bro🤟🏻🤟🏻

  • @bluaurax
    @bluaurax 6 หลายเดือนก่อน

    Phenomenal video bro!

  • @angiebui2887
    @angiebui2887 6 หลายเดือนก่อน

    Thanks so much! Great tutorial!

  • @donutercz
    @donutercz ปีที่แล้ว

    Bro thank you so much, you saved me so many hours

  • @galberger3937
    @galberger3937 8 หลายเดือนก่อน +1

    Hi.
    Can you shoe how to create items that can be pickued up and increse player health?

  • @ilypavan
    @ilypavan ปีที่แล้ว

    Enjoying

  • @syfenw6586
    @syfenw6586 ปีที่แล้ว +1

    on me it says the assosciated script can not be loaded pls fix any compiling errors, but i cant find any errors

  • @jonnassonnas
    @jonnassonnas ปีที่แล้ว +3

    How do i make a healthbar but with hearts? Is it the same way?

    • @Delirioussss
      @Delirioussss 4 หลายเดือนก่อน

      Idk if you will see this or have solved the problem yet but yes you can you just need to make 2 different sprites for a heart one empty and one full and just use this method

  • @charithsenanayakerathi9533
    @charithsenanayakerathi9533 2 ปีที่แล้ว +2

    Hey bro, I am a beginner to unity, so I have a problem How do I use touch input when we make a mobile game? That means for example if I want the player to jump when I touch the screen. How do I do that?

    • @morebblakeyyy
      @morebblakeyyy  2 ปีที่แล้ว +1

      Hey bro, nice to have you here.
      Brackeys has a great tutorial on touch input

    • @charithsenanayakerathi9533
      @charithsenanayakerathi9533 2 ปีที่แล้ว

      @@morebblakeyyy okay, I will try, thanks!

  • @ZFilms-AT
    @ZFilms-AT 16 วันที่ผ่านมา

    Thanks!

  • @Abuchuranimax
    @Abuchuranimax ปีที่แล้ว +1

  • @chenpead
    @chenpead ปีที่แล้ว

    Hello, my camera is attached to my player because i want it to follow my player, but technically if my player gets destroyed, the camera will be gone too and it gives an error, can you tell me what to do please, already thanks

  • @monkeboyz-2
    @monkeboyz-2 ปีที่แล้ว

    For some reason when I add the script to the player, the public floats aren't showing. Do you know why?

    • @monkeboyz-2
      @monkeboyz-2 ปีที่แล้ว +1

      nvm I was being dumb and forgot to put a semi colin and the error wasn't showing up

    • @HaiderSaqib-id4ry
      @HaiderSaqib-id4ry 4 หลายเดือนก่อน

      @@monkeboyz-2 bruh

  • @vaaron8524
    @vaaron8524 ปีที่แล้ว

    I made a healing program from this demage program and I would like to ask how can I prevent the max health from being more than 100?
    Thanks in advance

  • @TheTerspet
    @TheTerspet ปีที่แล้ว

    hey man, sometimes when my player character dies and respawns, the healthbar wont update and (in my case) stays black instead of getting back to full red, health system in inspector that heal is back to full but the healthbar stays black until i get hit again or healmyself up, is there a way to fix this issue? also sorry if i couldnt explain better, its my first time working on a project by myself

  • @merekbrent8081
    @merekbrent8081 8 หลายเดือนก่อน

    There was no plain square asset for unity and the health bar is all there but when I load in it does not pup up.

    • @miskasstories8035
      @miskasstories8035 6 หลายเดือนก่อน

      Have you clicked on the little Eye icon on the top right in the Image selection?

    • @AgentX-ye8sh
      @AgentX-ye8sh 6 หลายเดือนก่อน

      I have the same issue. Yes I have clicked the Eye theirs just no such thing as a Square apparently lol

  • @moxpp6541
    @moxpp6541 4 หลายเดือนก่อน

    would this tutorial work for 3D as well?

  • @t.b.g158
    @t.b.g158 2 ปีที่แล้ว

    Bro can you make a tutorial about how to dash and make a Pulse wave that pushes away enemies?
    Trying to find a simple one and can't

    • @morebblakeyyy
      @morebblakeyyy  2 ปีที่แล้ว

      I’ll add it to my list👌🏻

  • @TheBeefwacker
    @TheBeefwacker 8 หลายเดือนก่อน

    why is it when i lose 1 health out of 100 the whole bar disappears?

    • @oggoboggo-jg8gx
      @oggoboggo-jg8gx หลายเดือนก่อน

      its out of 1 so set it to 0.3 or smth

  • @consta_mode2202
    @consta_mode2202 2 ปีที่แล้ว

    Bro I am a beginner and it is horrible to not say that u use a other Version(also in the Infotest)

  • @blezzeth5283
    @blezzeth5283 2 ปีที่แล้ว +1

    Hey will that work on unity 3d?

    • @morebblakeyyy
      @morebblakeyyy  2 ปีที่แล้ว +2

      Should do!

    • @blezzeth5283
      @blezzeth5283 2 ปีที่แล้ว

      @@morebblakeyyy thank you!

    • @blezzeth5283
      @blezzeth5283 2 ปีที่แล้ว +1

      @@morebblakeyyy you're the goat brother, it worked perfectly fine, now I just have to make my game over screen work and make some physics haha

    • @morebblakeyyy
      @morebblakeyyy  2 ปีที่แล้ว

      @@blezzeth5283 good stuff🙌🏻

    • @raviensermo3103
      @raviensermo3103 7 หลายเดือนก่อน

      you will need to change the 2d in all the scripts to 3d

  • @raviensermo3103
    @raviensermo3103 7 หลายเดือนก่อน

    this is my script: but it doesnt work
    public class DamageScript : MonoBehaviour
    {
    public float damage;
    // Start is called before the first frame update
    void Start()
    {

    }
    // Update is called once per frame
    void Update()
    {

    }
    private void OnCollisionEnter2D(Collision2D other)
    {
    if (other.gameObject.CompareTag("Player"))
    {
    other.gameObject.GetComponent().health -= damage;
    }
    }

    }

    • @smulched
      @smulched 6 หลายเดือนก่อน

      there is no public playerhealth

  • @niuka8688
    @niuka8688 2 ปีที่แล้ว

    is this working?