Unity 2D Platformer for Complete Beginners - #7 HEALTH SYSTEM

Поділитися
Вставка
  • Опубліковано 28 лис 2024

КОМЕНТАРІ • 434

  • @PandemoniumGameDev
    @PandemoniumGameDev  3 роки тому +70

    If you're getting "The type or namespace name 'Image' could not be found" make sure to include using UnityEngine.UI (Check line 2 at 7:59 for reference)
    ● Support the channel on Patreon or UA-cam: www.patreon.com/pandemonium_games
    ua-cam.com/channels/pkMj5b5kl2_YApDvgUCVQQ.htmljoin
    ● Subscribe to the Weekly Pandemonium Newsletter: www.pandemonium-games.com/#:~:text=About%20Me-,Weekly%20Pandemonium,-Subscribe%20to%20our

    • @MusicFlowDaily
      @MusicFlowDaily 3 роки тому +4

      You doing a great job. We as the viewers can always pause or rewind. :) The main goal is information, and you convey it perfectly.
      And oh God, the scripts, the fact that you give access to them, really saves endless hours for newbies. This makes your videos much (MUCH) more useful than all the tutorials that are without scripts.

    • @PandemoniumGameDev
      @PandemoniumGameDev  3 роки тому +5

      @@MusicFlowDaily Highly appreciated, very glad I'm helping. Let me know if you have any issues.

    • @quotes612
      @quotes612 3 роки тому +3

      I will admit that I do find myself rewinding quite a bit, but I feel that overall the pacing is fairly good and that if somebody misses something they can simply rewind.

    • @baseddino
      @baseddino 2 роки тому

      is this some kind of sick joke

    • @PandemoniumGameDev
      @PandemoniumGameDev  2 роки тому

      @@baseddino huh?

  • @adeladam2325
    @adeladam2325 9 місяців тому +13

    It's nice revisiting these tutorials years later to see how much I have improved. This also allows me to appreciate just how good you are. Will forever be grateful for this series.

  • @rayyandarbashi7166
    @rayyandarbashi7166 2 роки тому +17

    Hey, if anybody doesn't like the collider on the saw, and you can't change it the way you want it to be because it has a box collider 2D, then you can add an "Edge Collider 2D" and then edit the collider on the saw the way you want it to be, and don't forget to put "Is Trigger" on the edge collider so it can damage your player. Oh and it's safe to remove the box collider 2D component if you're going to do this.

    • @Nightzo
      @Nightzo 2 роки тому +2

      Thanks. Didn't realise there were more colliders. There's a wheel collider at the bottom so that could be fitting for this circular saw

    • @stormy2049
      @stormy2049 2 роки тому

      Thanks forever

  • @Call_Ada
    @Call_Ada 2 роки тому +2

    A new Brackeys is here! Thank you!

  • @lov3ly298
    @lov3ly298 2 роки тому +5

    Thank you very much, man! Your help to grow future game developers is invaluable

  • @renderartist
    @renderartist 2 роки тому +2

    These videos are amazing, this video series makes Unity way more manageable to grasp. I recently got into learning Swift for iOS and macOS dev, I also mess around with Arduino and the very low-level C programming language it uses, it's cool to see so many similarities in the C# code language and that keeps me motivated and hungry for more. I love your delivery, you keep a fast enough pace to keep it interesting. Thanks so much for the thoroughness in explanation! Subscribed!

    • @PandemoniumGameDev
      @PandemoniumGameDev  2 роки тому +1

      Thanks a lot, good luck with it and let me know if need help :)

  • @SURESHJAT-be4km
    @SURESHJAT-be4km Рік тому +2

    I Lost Intrest in Unity few months ago but this tutorial is regerating my Intrest. Thank you for this best content! Love You

  • @Geckotr
    @Geckotr 3 роки тому +2

    oh man, it's Zelda's health system. So cool. I love it

  • @EckoTheGecko1
    @EckoTheGecko1 3 роки тому +14

    Hey! loving the series so far, i've dabbled with a few other styles of games but never a platformer! Will you be continuing this series?

    • @PandemoniumGameDev
      @PandemoniumGameDev  3 роки тому +6

      Yes, episode 8 will be about iFrames and 2 new types of enemies.

  • @yugbhagat6531
    @yugbhagat6531 3 роки тому +1

    Not gonna lie ..i am just watching this one...and its so cool...its just PERFECT MAN!..THANKS A TON

  • @the1sanash
    @the1sanash 3 роки тому +2

    I made a mistake when i changed the layering i forgot to add a layer for fire ball so they were not showing lol just a tip just incase

  • @heypikachu276
    @heypikachu276 Рік тому

    As a 3D artist who sometimes does pixel art, I can tell you that making the animations is difficult lmao. However, this tutorial is clear cut, and very easy to follow, as well as being compatible for custom animations.

  • @gearsbright4599
    @gearsbright4599 Рік тому +1

    When recording an animation I found it useful to duplicate the last sprite. For example if the last sprite is on the 0.20 frame, then double it and set new last sprite at 0.24 frame so the duration of each sprite of an animation will be equal. Otherwise the last frame is always shorter than the rest and it results in a bit twitchy animation.

  • @Geckotr
    @Geckotr 3 роки тому +7

    Error CS0246 The type or namespace name 'Image' could not be found (are you missing a using directive or an assembly reference?) i get this error in the Healthbar script. Can't find the reason

    • @Geckotr
      @Geckotr 3 роки тому +5

      ok i found the problem. i didn't add the UnityEngine.UI line on top

    • @rvens8885
      @rvens8885 3 роки тому +1

      @@Geckotr Thank you!! I missed that detail as well

  • @hahaeggplanet12
    @hahaeggplanet12 2 роки тому +2

    your tutorials make it simple and fun to learn unity!

  • @strahinja1910
    @strahinja1910 2 роки тому

    If anyone has a problem with the Saw not moving, just set MovingLeft bool as true and that should be it.Btw great tutorials

  • @baseddino
    @baseddino 2 роки тому +2

    Assets\scripts\Healthbar.cs(10,30): error CS0246: The type or namespace name 'Image' could not be found (are you missing a using directive or an assembly reference?)
    do i have to watch previous tutorials /:

    • @baseddino
      @baseddino 2 роки тому +1

      someone else had the same problem you need "using UnityEngine.UI;"

  • @biscuitbutb4106
    @biscuitbutb4106 6 місяців тому +3

    11:42 When did the Transition Structure of the Animator change? I did not see you make a transition from Any state to both Attack and Jump. You only made it for Any State to Jump initially but now out of no where it's changed.

    • @ngaophongvan3116
      @ngaophongvan3116 Місяць тому

      I was really confused by this

    • @Game-rw1ov
      @Game-rw1ov Місяць тому

      @@ngaophongvan3116 I was too but its working right??

  • @MaxxYT-YouTube
    @MaxxYT-YouTube 2 роки тому +2

    If you want the "die" animation to look better then just add "None" sprite in the last key of die animation 😄

    • @varshas296
      @varshas296 Рік тому

      I have added the die animation but I'm not getting in the game

  • @erayogunozdemir8983
    @erayogunozdemir8983 2 роки тому +1

    Thank you very much for these courses you have done here. It makes me very eager to do projects with unity.

  • @WaldoGamingGD
    @WaldoGamingGD Рік тому

    Keep up the great work man! As a ten year old who's been coding for ~5 years, even I was able to get through these videos with my limited attention span!

  • @toastlotl
    @toastlotl 2 місяці тому

    Not sure if anyone else had this issue but when you add the sorting layers, make sure the global light it set to target all sorting layers, not just the default,. all my sprites we're rendering black when i sorted them into their respective layers since they weren't being targeted by the global light.

  • @ShadowCraft1118
    @ShadowCraft1118 3 місяці тому +2

    my health bar aint taking damage can someone please help me ive tried everything

  • @Rejgam756
    @Rejgam756 3 роки тому

    I miss the "Mission passed. Respect +1" outro. It was really rewarding.

  • @matejkunstelj7852
    @matejkunstelj7852 2 роки тому +1

    thx a lot! i also added a weak heart that gives you a half a ordinary heart! :) :) :)

  • @olexayko
    @olexayko Рік тому

    You could change position of saw just by adding sinus function of time to initial saw position, but your approach is also good

  • @Rubiole
    @Rubiole 2 роки тому +4

    I think i lost somewhere but at 11:32 i didnt have the same animations structure as you, I have idle to attack and idle to jump, can i just change the transitions as you have em there? .w.

    • @scorpiusjones5436
      @scorpiusjones5436 Рік тому

      I suspect that was somthing he was working on off camera? I noticed that also, but I'm keeping mine the way we set it earlier just in case :)

    • @strong3073
      @strong3073 10 місяців тому

      ​@@scorpiusjones5436same issue here
      I think i can just go on.
      God helps😂

  • @rttracy
    @rttracy 3 роки тому +2

    such a good video, also your pacing is fine, I watch your videos on 1.5x sometimes 1.75x speed haha.

    • @PandemoniumGameDev
      @PandemoniumGameDev  3 роки тому

      I also think it's a bit slow, but hey I'm not a beginner 😁

  • @heroweasel790
    @heroweasel790 2 роки тому

    Great content. Im new to the channel, and have been following along with about one video per night. Learning a lot, hoping to learn more!

  • @globes179
    @globes179 Рік тому +1

    Awesome, you're a champ!

  • @Cleevor
    @Cleevor 2 роки тому

    this is the most organized thing ever

  • @cherrynoize
    @cherrynoize 7 місяців тому

    If all of your sprites are also black find Global Light 2D in the hierarchy and under Light 2D in the inspector set Target Sorting Layers to 'All'. (Or just delete the Global Light 2D object entirely.)

  • @emiljordan8949
    @emiljordan8949 3 роки тому

    Thank you for making these videos! They're a lot of help

  • @FrosenHell
    @FrosenHell 2 роки тому +4

    I've noticed in the animator you put an transition from any state to attack? when you did that? I have two transitions from idle to attack and from attack to idle. If I change the transition like yours in 11:20, will it brake the game?

  • @wholesomez4967
    @wholesomez4967 3 роки тому +2

    hey im havinga problem that when i damage the player the healthbar wont update and its just stays full health even tho i already damage my character 3x already and the hurt and death animation works fine, its just the health wont decrease.

  • @Dark_3333
    @Dark_3333 Рік тому +1

    the saw movement(sideways) worked greatly the first try, but for the next tries it doesnt move anymore. why?
    edit: I solved it, making the animation dragging the frames like you did somehow also saved the coordinates. I just hade to remake the animation the old way.

  • @Dev.K.Patel_19-June
    @Dev.K.Patel_19-June 5 місяців тому

    guys, just a suggestion cuz i had nothing better to do:
    at 19:50, you can type transform.position += new vector3(speed * time.deltatime, 0, 0); for getting it a bit compact. same for leftMovement...

  • @ninjakiwigames5418
    @ninjakiwigames5418 3 місяці тому +2

    A reminder if the health bar doesn't work for you: Link the scripts to your player!

    • @ninjakiwigames5418
      @ninjakiwigames5418 3 місяці тому

      And then link things to the script (images, health)

  • @ignaciogalli343
    @ignaciogalli343 8 місяців тому

    "I really love you, man. If someday you come to Argentina, I'll invite you to an 'Asado'."

  • @TheGreatProphecy
    @TheGreatProphecy 2 роки тому +2

    This is amazing! I used an enum to create a few different cases and with the damage and health made this awesome. I have an item that does 25 damage every time It hits the object. The object has 100 health and gets down to 0. When it gets down to 0 it should delete itself, but it does not. I have to hit it one more time for it to delete.

    • @TheGreatProphecy
      @TheGreatProphecy 2 роки тому

      Id love to send it to you on discord if you were up for it

    • @PandemoniumGameDev
      @PandemoniumGameDev  2 роки тому +2

      In this case check your if statement. I think you set are checking currentHealth

    • @TheGreatProphecy
      @TheGreatProphecy 2 роки тому

      @@PandemoniumGameDev yeah i figured it out! I had it set to an if the health is above zero, then an else, so then when the enemy reached zero it didnt reach the else until the next call, so i turned it into a embedded if statement and it works great! Thank you so much for these videos! The way you explain the methods and whatnot really make things click for me.

  • @3812.0
    @3812.0 7 днів тому

    I can't drag the HealthBar image to HealthbarTotal at 6:55. It just displays Healthbar_0 instead. How can I fix it?

  • @AchimTheEagle
    @AchimTheEagle Рік тому

    This is an amazing tutorial! 10/10

  • @eleven1223
    @eleven1223 7 місяців тому +2

    I’m having trouble getting the heart to add health 😢. All the code looks exactly the same to me. Please helppp

  • @a.giovanni.m6740
    @a.giovanni.m6740 2 роки тому +1

    About the die animation, when I tried it, it plays while the Player is jumping, idle, and running, but not while hanging on a wall (wall jump).

  • @hopedopr5550
    @hopedopr5550 3 роки тому

    Really really thanks for making these videos... It really helps in understanding the topic

  • @cleangaminganalysis8651
    @cleangaminganalysis8651 2 роки тому +1

    finally finished this point

  • @lucifergamer4067
    @lucifergamer4067 18 днів тому +1

    When i select the 'set native size' the heart remains single. (Not becoming 10)

    • @PandemoniumGameDev
      @PandemoniumGameDev  18 днів тому

      You probably dragged in the single heart sprite, not the healthbar

    • @lucifergamer4067
      @lucifergamer4067 18 днів тому

      @PandemoniumGameDev no I didn't,
      Nevermind I somehow solved it. Best tutorial btw

    • @marcnicholejasmin2253
      @marcnicholejasmin2253 16 днів тому

      @@lucifergamer4067 what did you do to solve it? I have the same problem

    • @lucifergamer4067
      @lucifergamer4067 16 днів тому

      @marcnicholejasmin2253 select multiple in image edited tab

    • @marcnicholejasmin2253
      @marcnicholejasmin2253 16 днів тому +1

      @@lucifergamer4067 mine is automatically set to multiple, and now i tried to set it on single then the problem was solved HAHAHAHA

  • @X_Daniel466
    @X_Daniel466 Рік тому +1

    Well done tutorials. Thank you.

  • @dotnetdojo-cash
    @dotnetdojo-cash 20 днів тому

    Great content, thank you!

  • @Worlfable
    @Worlfable 2 роки тому

    Thank you my RASSIAN friend!

  • @AlkalinityGame
    @AlkalinityGame Рік тому +2

    I got an error saying for the healthbar at script saying that’s there’s no image origin what do I do??

    • @danieltai6494
      @danieltai6494 6 місяців тому

      at 8:02 type using unity engine .ui at the top it should fix it

  • @piriyasakpaopao2549
    @piriyasakpaopao2549 3 роки тому +2

    I have a question about the saw thing, what should I put in my code if I wanted the saw to face the direction that it is moving towards.

  • @NoName-vg8vf
    @NoName-vg8vf Місяць тому

    Please Help!!! at 17:41 the saw is not moving . the player is taking damage but whenever it hits the saw the all the animation stops and freezes at hurt in animator. then only the player can move across the ground without any animation (the animator stops at hurt).

  • @kwinnerr
    @kwinnerr 3 роки тому +3

    When I die my player still keeps moving while i have this in my script "GetComponent().enabled = false;"
    The player just walks in the direction of the last pressed button

    • @Zaros3433k
      @Zaros3433k 3 роки тому

      had this issue too but then I turned exit time to 0 and transition duration to 0 which resolved the issue for me.

    • @Sethy444
      @Sethy444 2 роки тому

      don't worry, that's normal because you don't have a death animation yet and "zaros3433k" (the previous reply) is probably right

  • @Chemtekmain
    @Chemtekmain Рік тому +2

    when did he change the transitions from idle - attack to anystate - attack? did i miss something?

  • @alcoop74
    @alcoop74 2 роки тому +1

    ive got an animation for my health bar, is there a way i could just have it change to a new sprite on hit as my character will have 5 hits of health before death and ive got 5 different sprites to represent that

  • @BlussedKings
    @BlussedKings 6 місяців тому

    Thank you so much for this video!

  • @salsdding6724
    @salsdding6724 10 днів тому

    Thank you , you helped me so much ❤

  • @afence3642
    @afence3642 2 роки тому +1

    Hey ive got a problem after the Healthbar script: Assets\C#\Health\Healthbar.cs(12,50): error CS1061: 'HealthBar' does not contain a definition for 'currentHealth' and no accessible extension method 'currentHealth' accepting a first argument of type 'HealthBar' could be found (are you missing a using directive or an assembly reference?)
    please help

    • @bloopbeep1051
      @bloopbeep1051 Рік тому

      Did you find the fix as ive got the same error?

  • @GAMINGWITHNEONyt
    @GAMINGWITHNEONyt 2 роки тому +1

    my player is not taking damage from saw ; after enabiling isTrigger on in saw; pls help me out

  • @merableamber
    @merableamber 3 місяці тому +1

    Health.cs(16,17):error CS0111: Type 'Health' already defines a member called 'TakeDamage' with the same parameter types
    Health.cs(10,18):error CS0111: Type 'Health' already defines a member called 'Awake' with the same parameter types
    I'm struggling with this an I don't know what to do about it, please help🙏

  • @Game-rw1ov
    @Game-rw1ov Місяць тому +1

    i got another problem that the saw is not showing in the game screen but the player is getting damage when go through it?????😒😒😒😒😒😒

    • @PandemoniumGameDev
      @PandemoniumGameDev  Місяць тому +1

      Check the sprite renderer component and change the sorting layer

    • @Game-rw1ov
      @Game-rw1ov Місяць тому

      @@PandemoniumGameDev thanks bro but it was the z-axis btw are you making some new same type of videos for beginners???🥲🥲

    • @PandemoniumGameDev
      @PandemoniumGameDev  Місяць тому

      @@Game-rw1ov you can try the new top down series, it's a bit more complex though

  • @joydrive_
    @joydrive_ Місяць тому +1

    i can see my heart bar in the Game view but not in the Scene view. Can someone help?

    • @Game-rw1ov
      @Game-rw1ov Місяць тому +1

      try to zoom out the scene

  • @CD-fx8vk
    @CD-fx8vk 2 роки тому +1

    Hey. I'm loving those unity tutorials. They are teaching me a lot. I've heard that a lot of people use Aseprite as well to help with art stuff. I've also used it to design the health bar needed in this tutorial. Do you recommend Aseprite? and what program do you use?

    • @PandemoniumGameDev
      @PandemoniumGameDev  2 роки тому

      I don't do pixel art tbh, I use Inkscape but my experience as an artist is very, very limited. I heard good things about Aseprite from good artists though, so give it a shot if you didn't already :D

  • @ANDRIYFifa
    @ANDRIYFifa 15 днів тому

    Hello, what should I do when I downloaded the healthbar.png, but when I add it unity, only 1 heart is displayed instead of 10?

    • @PandemoniumGameDev
      @PandemoniumGameDev  14 днів тому

      Check the import settings on the sprite, maybe it's set to multiple, change it to single

  • @calvinbirch7547
    @calvinbirch7547 3 роки тому +1

    Works Great!

  • @capooey1227
    @capooey1227 Рік тому

    after using the {get; private set;} it says healthbar does not contain a def for 'currentHealth' and no accessible extension method 'currentHealth' accepting a first argument of type 'Healthbar' could be found
    any reason why this could be happening?

  • @HALW1ST
    @HALW1ST 10 місяців тому

    Подскажите. Почему у меня healthbar движется вместе с камерой и персонажем?? Как исправить?

  • @Egor-kc2dx
    @Egor-kc2dx Рік тому

    Great video bro

  • @ryod8774
    @ryod8774 2 роки тому

    in the script, what was the image private? I tried to do it and it said the the namespace couldn't be found

  • @BiasedCar
    @BiasedCar 6 місяців тому

    Hey, can you please tell me why does my character fall off forever whenever I touch any object with Box Collider 2D (is trigger ON)? PLEASE HELP

  • @yaokabanzai158
    @yaokabanzai158 8 місяців тому

    привет! у меня немного другой скрипт..и когда я добавил ваш у моего персонажа проигрывается анимация смерти, но он просто начинает перемещаться в бок..в чем может быть проблема?

  • @greenguy358
    @greenguy358 Рік тому

    So how would I be able to make a health bar without the filler tool, specifically using different images every time I take damage

  • @robertov.dibisceglia7887
    @robertov.dibisceglia7887 3 роки тому +1

    Your videos are saving my project! Really big help ; if I want to implement a second player, what are the big things I need to look out for when re-using the scripts (apart from the right tags and calling the right script names). Big fan really like your personality keep up the good work :)

    • @PandemoniumGameDev
      @PandemoniumGameDev  3 роки тому +2

      Thanks a million for the support!
      Well first of all you'll need to set different controls for each player(movement, attack etc).
      Other than that you need to create another UI object for the second player health, the rest of the scripts should work fine the way they are.

    • @doodledoo5611
      @doodledoo5611 3 роки тому +2

      A big help for me was:
      [SerializeField] private KeyCode left;
      this permits you to get inputs from specific keys at one time

  • @error-hz8qc
    @error-hz8qc 3 роки тому +1

    whenever i take damage from trap, my game stops and throws me this error
    NullReferenceException: Object reference not set to an instance of an object
    Health.TakeDamage (System.Single _damge) (at Assets/Scripts/Health.cs:25)
    Trap.OnTriggerEnter2D (UnityEngine.Collider2D collision) (at Assets/Scripts/Trap.cs:12)

    • @error-hz8qc
      @error-hz8qc 3 роки тому +1

      I just made Animator public from private in Health script and somehow it worked!! IDK what happened ? Could you explain me ??

    • @loganandfun3917
      @loganandfun3917 Рік тому

      i have the same problem wdym you set animator to public how did u do that

  • @dkordy
    @dkordy 2 місяці тому

    If it happens that at the moment when you are injured and you have the last health, if you run into a saw and you accidentally pick up a heart that happens to be nearby, the player will die but you will be given a heart. So it's a bug - and it should be fixed.

    • @dkordy
      @dkordy 2 місяці тому

      And I think it would be good to add some max-health. I mean why those eight extra sprites that are hidden? unless maybe in the future you will add that there is a maxhealth?

  • @rizalaldiansyah1961
    @rizalaldiansyah1961 2 роки тому

    thank you for helping me from uas, glad i fnd this channel

  • @kuroehe6454
    @kuroehe6454 Рік тому

    Hello, i want to ask why did the saw disappear on game but it's appear on scene, it became invisible deadly trap

  • @gustas1325
    @gustas1325 2 роки тому

    My Healthbar script, has an error, It shows error C0246: Type or namespace name "image" could not be found

  • @Hubxrt
    @Hubxrt 2 роки тому +2

    I remember you said in one spisode „you can do that if youre a massacist“ Hashshahhahs and i dobt know why its so funny for me now lol

  • @peterwojtek8468
    @peterwojtek8468 2 роки тому

    Great tutorial ! how would you go for making the Saw moving up and down ? I've tried copying the scripts logic and changing the transform.position.y, but the saw went up and never came back -_-. What am I missing ?

  • @micahburnside2281
    @micahburnside2281 4 місяці тому

    I don’t have any anchor presets icon or menu when setting the anchor

  • @PitouBruh
    @PitouBruh Рік тому

    If i also have jump animation which is also transit from any state, it wont trigger hurt animation during jumping animation. Any idea how to fix that?

  • @phillipquigley6143
    @phillipquigley6143 7 місяців тому

    Something is wrong with the script whenever I am trying to make an enemy to do damage to me it doesn't work.

  • @soyuzistrepublic9771
    @soyuzistrepublic9771 2 роки тому

    It keeps saying 'tyoe or namespace name 'Health' could not be found. What does this mean? What do I need to do?

  • @Swap-511.0
    @Swap-511.0 6 місяців тому

    my die animation doesnt work I did everything you do but it doesnt trigger the animation

  • @payrox1853
    @payrox1853 3 роки тому

    I got a new problem haha, i got an error that says that 'image' does not contain a definition for 'fillAmount' and no accesible extension method 'fillAmount' accepting a first argument of type 'image' could be found.

  • @Olat67
    @Olat67 9 місяців тому +1

    Hi I just can’t see the hearts in the game scene can anyone help me with that everything else is fine.

    • @Olat67
      @Olat67 9 місяців тому +1

      Never mind I fixed it 👍it’s something with the target display in the canvas I had my camera display on 2 and the target display was 1 in the canvas just changed it to target display 2 good tutorial by the way

  • @bostonharper7475
    @bostonharper7475 2 роки тому

    At 10.26 when I start my health bar starts of black and I press E and nothing happens but I’m not sure what I did wrong

  • @loganandfun3917
    @loganandfun3917 Рік тому +1

    some one please help i get an error with the hurt and die animation it says object referance not set to an instance of an object for 3 lines of code
    1: anim.GetComponent();
    2: anim.SetTrigger("hurt");
    3: anim.SetTrigger("die");
    im almost having to give up on the project because i cant find out what is wrong also i made sure that the hurt and die animations are spelt the same in the animator window and my code

    • @loganandfun3917
      @loganandfun3917 Рік тому

      2 months gone by and im still stuck on this error

    • @loganandfun3917
      @loganandfun3917 Рік тому

      omg fixed it under private void awake i put anim.GetComponent(); instead of anim = GetComponent(); idk weather to be sad or happy rn

  • @hahaeggplanet12
    @hahaeggplanet12 2 роки тому

    i can pick up health, every system works, but i can't see the health that i'm picking up (the image doesn't show when i run the game)

    • @tarytale1582
      @tarytale1582 2 роки тому

      Maybe your Sprite Renderer -> order in Layer is the reason?

  • @alakaspoon1458
    @alakaspoon1458 2 роки тому

    I was following your tutorial, and an issue that came up was that the player was not taking damage from the saw and wasn't interacting with the line of sight mechanism for the melee enemy. Would u a solution to fix this?

  • @kieranryan7625
    @kieranryan7625 2 роки тому +1

    I have this weird thing happening where the saw is working perfectly, showing up perfectly in Scene mode, but not game mode😂 Probably something dumb I'm overlooking. And it doesn't matter what sorting layer I have on it, no show on game view.
    Thanks!

    • @PandemoniumGameDev
      @PandemoniumGameDev  2 роки тому +2

      Check the Z position of the saw object, it's supposed to be 0.

    • @linkg5399
      @linkg5399 2 роки тому

      @@PandemoniumGameDev thank god i had the same issuse right now, love the tutorials btw helping me alot

  • @zeynepbalakar2735
    @zeynepbalakar2735 2 місяці тому

    I dont know why but 11:39my base layer is empty. No entry no idle nothing is there. But my game is working. How can I solve it

    • @zeynepbalakar2735
      @zeynepbalakar2735 2 місяці тому

      I closed unity and reopened it. It solved. I dont know whats the problem but this solved it.

  • @achsaw6617
    @achsaw6617 Рік тому

    What if the saw takes 2 hearts why is the heart bar not working correctly? Thank you

  • @insane6782
    @insane6782 3 роки тому

    so when i downloaded this project and open and played in unity fireballs weren't working it just showed some animation

  • @l1kr1k37
    @l1kr1k37 2 роки тому

    how did you make those hearts perfectly fit in unity slider values??? i was trying to make my own tiles for health, but it didnt worked properly

    • @l1kr1k37
      @l1kr1k37 2 роки тому

      nevermind, just solve it, but the video is still so good, my case was just a bit different

  • @issak1320
    @issak1320 Рік тому

    i did everything that you did and in the final, when i try to pickup the heart, he don't dissapear..

  • @Devilin666
    @Devilin666 2 роки тому

    Assets\Scripts\Health\Healthbar.cs(17,52): error CS1061: 'Health' does not contain a definition for 'currenthealthBar' and no accessible extension method 'currenthealthBar' accepting a first argument of type 'Health' could be found ( i dont know what is wrong)

  • @osamafreed4816
    @osamafreed4816 Рік тому

    The type or namespace name 'Health' could not be found (are you missing a using directive or an assembly reference?)
    ????????????????/

    • @PandemoniumGameDev
      @PandemoniumGameDev  Рік тому +1

      Did you call the Health script exactly like that? This error usually pops up when you change the names of the script or just call it differently from the start.