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

แชร์
ฝัง
  • เผยแพร่เมื่อ 13 ก.ย. 2024

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

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

    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)

    • @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 2 ปีที่แล้ว +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 6 หลายเดือนก่อน +9

    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 ปีที่แล้ว +16

    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

  • @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 11 หลายเดือนก่อน

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

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

    A new Brackeys is here! Thank you!

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

    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 ปีที่แล้ว +5

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

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

    This video is absolutely underrated , Thanks for good tutorial

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

    your tutorials make it simple and fun to learn unity!

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

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

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

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

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

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

  • @os.a.m.a
    @os.a.m.a 3 ปีที่แล้ว +18

    9:49
    When I open unity it says that theres a compiler error in line 7 and 8 "the type or namespace name 'Image' could not be found (are you missing a using directive or an assembly reference?)"

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

      You need to add using UnityEngine.UI, check it out here 7:58

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

      He is not only one, who get this error. And its look like magic, unnoticeable trick, which VS can perform :(
      And sublime text are not..

    • @PandemoniumGameDev
      @PandemoniumGameDev  3 ปีที่แล้ว

      @@alexkrat5562 you'll get used to it in time, everytime you work with UI images, texts etc you need to include the Unity engine.UI library.

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

      @@PandemoniumGameDev thanks i had the same error

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

      @@abhisavale5231 same haha

  • @biscuitbutb4106
    @biscuitbutb4106 3 หลายเดือนก่อน +2

    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.

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

    Many thanks for this series. It helped me a lot!

  • @hopedopr5550
    @hopedopr5550 3 ปีที่แล้ว

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

  • @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 ปีที่แล้ว

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

  • @gearsbright4599
    @gearsbright4599 11 หลายเดือนก่อน +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.

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

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

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

    Awesome, you're a champ!

  • @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 7 หลายเดือนก่อน

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

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

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

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

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

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

    Well done tutorials. Thank you.

  • @BlussedKings
    @BlussedKings 3 หลายเดือนก่อน

    Thank you so much for this video!

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

  • @AchimTheEagle
    @AchimTheEagle 11 หลายเดือนก่อน

    This is an amazing tutorial! 10/10

  • @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 2 ปีที่แล้ว +2

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

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

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

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

  • @WaldoGamingGD
    @WaldoGamingGD 9 หลายเดือนก่อน

    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!

  • @ignaciogalli343
    @ignaciogalli343 5 หลายเดือนก่อน

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

    • @PandemoniumGameDev
      @PandemoniumGameDev  5 หลายเดือนก่อน +1

      Best thing I heard in a while, thank you!

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

    Works Great!

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

    this is the most organized thing ever

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

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

    • @cricketo2001
      @cricketo2001 10 หลายเดือนก่อน

      Same problem

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

      bruhhhh. same problem

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

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

    finally finished this point

  • @Hubxrt
    @Hubxrt ปีที่แล้ว +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

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

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

      I have the exact same problem! And yeah it did break the game

    • @cricketo2001
      @cricketo2001 10 หลายเดือนก่อน

      Same problem

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

      Same problem god hellllp

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

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

  • @Egor-kc2dx
    @Egor-kc2dx ปีที่แล้ว

    Great video bro

  • @Dev.K.Patel_19-June
    @Dev.K.Patel_19-June 3 หลายเดือนก่อน

    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...

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

    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.)

  • @dkordy
    @dkordy 9 วันที่ผ่านมา

    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 9 วันที่ผ่านมา

      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?

  • @eleven1223
    @eleven1223 5 หลายเดือนก่อน +2

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

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

    Thank you my RASSIAN friend!

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

      😂I'm not russian, although I'm very glad to help!

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

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

    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.

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

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

  • @piriyasakpaopao2549
    @piriyasakpaopao2549 2 ปีที่แล้ว +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.

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

      i need the answer too XD

  • @hollowclock9948
    @hollowclock9948 3 ปีที่แล้ว

    Thanks for the help

  • @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 2 ปีที่แล้ว

      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

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

    Great Video👍Helped me out al lot❤

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

    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

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

    Thank you so much

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

    Great Tutorial
    Thanks for taking your time making this videos.
    How can i get it to respawn with full hearts each time the player dies?

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

  • @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 4 หลายเดือนก่อน

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

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

  • @armedhenwithoutarms
    @armedhenwithoutarms 3 หลายเดือนก่อน

    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

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

    Hello, I have a problem. After I did the steps until 10:29, a error appears. It says error CS0246: The type or namespace name "Health" could not be found (are you missing a using directive or an assembly reference?)
    And another problem is, that the 3 options under the script "Healthbar" "Player Health", "Totalhealthbar" and "Currenthealthbar" don´t show up

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

      brother use thisIf you're getting "The type or namespace name 'Image' could not be found" make sure to include
      using UnityEngine.U I (Check line 2 at 7:59 for reference) it may help you

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

      Did you ever find an answer to this? Facing this issue now.

  • @StigDesign
    @StigDesign 3 ปีที่แล้ว

    Great Video :D

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

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

  • @Olat67
    @Olat67 6 หลายเดือนก่อน +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 6 หลายเดือนก่อน +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

  • @Swap-511.0
    @Swap-511.0 3 หลายเดือนก่อน

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

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

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

    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🙏

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

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

  • @lorenzoboiko
    @lorenzoboiko 3 ปีที่แล้ว

    17:50 hahaha I laughed so hard, I can’t wait for the next video tutorial

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

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

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

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

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

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

    Thanks!

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

  • @ninjakiwigames5418
    @ninjakiwigames5418 20 วันที่ผ่านมา +1

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

    • @ninjakiwigames5418
      @ninjakiwigames5418 20 วันที่ผ่านมา

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

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

    Hello, thank you for awesome content you helping some of us who are absolute beginners, the pacing is abit fast but I am still managing by pausing and rewinding. Your explanations are really good so thank you. I have a issue where I jump and my player sometimes get stuck in the air and theres nothing but the background. Can you please assist.

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

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

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

    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.

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

    Will the enemies walk around and try to shoot back? And maybe you can add a visible hp bar above the enemy so player can kill the enemy (or boss fight). And i noticed that camera doesnt follow the player if he goes up (by wall climbing), so maybe you can add that somehow? Great videos btw, cant wait for the next part!!

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

      Will def add enemies with healthbars. The camera doesn't go up on purpose, otherwise you'd see the black background. I'll keep the camera in the center of the room for this game, like in the Binding of Isaac.

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

      @@PandemoniumGameDev Thanks for answer!

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

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

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

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

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

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

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

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

    Hey! Why do you make SerializerField private, shouldn't they be public? Also, in your real projects do you prefix private variables with the underscore "_"? And thanks for the tutorial!

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

      1. SerializeField is used to make variables visible in the inspector, but public variables already are visible in the inspector, so there's actually no point to use SerializeField with public variables.
      2. I only use _ for parameter variables inside methods like `private void Calculate(_number)` but that's just a personal preference, go with what you like most. The only rule that I found more people tend to follow is to use lowercase letters for variables and uppercase for functions, other than that everyone does what they like :D

  • @error-hz8qc
    @error-hz8qc 2 ปีที่แล้ว +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 2 ปีที่แล้ว +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

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

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

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

  • @jazz1706
    @jazz1706 3 หลายเดือนก่อน

    In the healthbar script "Image" is giving me an error as it could not be found

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

  • @insane6782
    @insane6782 3 ปีที่แล้ว

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

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

    i spawn my player in at the start how would i go about setting up a health system for that? I'm going to find the answer surely, but maybe someone who is having the same issue could see this and get an quick answer in the future.

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

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

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

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