Unity Player Health and Health bar Tutorial

Поделиться
HTML-код
  • Опубликовано: 7 ноя 2024

Комментарии • 49

  • @t.b.g158
    @t.b.g158 2 года назад +10

    Bro...How come no one on RUclips 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

  • @bluaurax
    @bluaurax 7 месяцев назад

    Phenomenal video bro!

  • @donutercz
    @donutercz Год назад

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

  • @angiebui2887
    @angiebui2887 7 месяцев назад

    Thanks so much! Great tutorial!

  • @ilypavan
    @ilypavan Год назад

    Enjoying

  • @galberger3937
    @galberger3937 8 месяцев назад +1

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

  • @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

  • @ZFilms-AT
    @ZFilms-AT 29 дней назад

    Thanks!

  • @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?

  • @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

  • @Abuchuranimax
    @Abuchuranimax Год назад +1

  • @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

  • @moxpp6541
    @moxpp6541 4 месяца назад

    would this tutorial work for 3D as well?

  • @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 7 месяцев назад

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

    • @AgentX-ye8sh
      @AgentX-ye8sh 7 месяцев назад

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

  • @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

  • @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

  • @TheBeefwacker
    @TheBeefwacker 9 месяцев назад

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

    • @oggoboggo-jg8gx
      @oggoboggo-jg8gx 2 месяца назад

      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?