#3 Player Health & Damage Effects : Let's Make a First Person Game in Unity!

Поделиться
HTML-код
  • Опубликовано: 27 апр 2022
  • In this video were going to quickly adapt the health-bar from a previous tutorial and add an overlay effect that appears when our player Takes Damage!
    ❤️❤️❤️🖤🖤
    In case you missed the Health Bar Tutorial!
    👉 • How to make a Better H...
    Check out My Low Poly Stylised Camping Pack on the Unity Asset Store!
    ⛺ assetstore.unity.com/packages...
    Come Join us on the Discord!
    🎮 / discord
    💚 Thanks for watching!
  • ИгрыИгры

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

  • @TheOnlyK1ng
    @TheOnlyK1ng 2 года назад +8

    Thanks so much for the new video. It's really needed since the old one was getting a bit outdated! Nice vid

  • @user-gl7gj5mq2n
    @user-gl7gj5mq2n 11 месяцев назад

    Bro this is great, it really helped me a lot, and I now understand code enough to make small improvisations for my game, like instead of an overlay when you get damaged it shows when you have low health, thanks a lot, it helped me make my game.

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

    This is really exciting stuff to learn, one of the best tutorials i've done!

  • @erSALVA18
    @erSALVA18 2 года назад +2

    Thank you for your work, very helpful!!

  • @hansthegrenadier6411
    @hansthegrenadier6411 Год назад +17

    Cant wait for next one! I'm curious about the weapon animations, projectiles, etc.

  • @saktiharahap6006
    @saktiharahap6006 2 года назад

    Wow, it turned out to be continued again, I'm very happy, I'm waiting for the next video

  • @isokrah
    @isokrah 7 дней назад

    You are a beast man thank you so much!!

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

    looking forward to the next one. totally hungry for more

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

    Thanks for tutorial, hope see u next videos!

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

    looking forward for next one. This is good quality content course .

  • @owenhilton8054
    @owenhilton8054 2 года назад

    cant wait for the next part!

  • @t4w
    @t4w 2 года назад +1

    i am exited to learn moreeee

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

    Cant wait to see the next Video of this awesome series.

  • @ps5games821
    @ps5games821 2 года назад +2

    Thank you very much

  • @HB-wk6zj
    @HB-wk6zj 2 года назад

    Thanks a lot man!!!!!!

  • @inquisitive240
    @inquisitive240 11 месяцев назад

    THIS IS SO GOD DAMN COOL

  • @mwr1054
    @mwr1054 2 года назад +2

    Awesome, a fairly recent tutorial for Unity. Keep it up man!
    *Edit: i meant very and not fairly :)

  • @badbanana9894
    @badbanana9894 Год назад +4

    You deserve more recognition dude.
    We have a community by the devs for the devs if your interested and still wanting to be a creator hit me back someway.
    I used your tutorials in a completely different capacity than you've explained. It's mobile and ui based with buttons turning off and on like you described in tutorial 2.
    Works perfectly
    And very lucrative
    Bless you bro.
    Was a big help to learn the syntax for raycasting and I_Interactable

  • @mattia628
    @mattia628 2 года назад

    Thank you keep up the good work

  • @mattia628
    @mattia628 2 года назад

    Thank you

  • @MadamRage93
    @MadamRage93 2 года назад +2

    He Back 🤩

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

    Great tutorials! But I have questions, first are you gonna render the characters arms with a different camera layer so the arms don’t clip in the walls and so you can change their FOV separately, and second will you show how to do recoil, thanks!

    • @NattyGameDev
      @NattyGameDev  Год назад +2

      Thanks heaps! I didn't include rendering the weapon and arms on a separate layer when prototyping, but this is something I will look at including for the around post processing stage of the videos! and yes I will definitely be including how to do recoil in later parts! :)

  • @defnotwave
    @defnotwave 2 года назад +4

    You forgot to add this video to the "Lets make a fps game in unity" Playlist!!

  • @lucabenchea4555
    @lucabenchea4555 7 месяцев назад +3

    my health bar doesn't work ,when i press the cubes the health doesn't go down or up and the text remains the same pls help

  • @Federal_TK
    @Federal_TK 2 года назад

    He's back

  • @emielv8365
    @emielv8365 2 года назад +3

    @Natty Creations can you please make a link where we can download the assets for this video?
    Edit: Also pls let us know how we can do the interact effect with the crosshair

  • @simonunlock9728
    @simonunlock9728 2 года назад +1

    Dear Natty, can you please upload a video with the enemy ai please i love your videos so much❤

  • @TheOnlyK1ng
    @TheOnlyK1ng 2 года назад +9

    Can you please make a tutorial on how to make the crosshair just like yours where it fills in when u place it on top of an interactable. Or have u already explained it in a previous video?
    Edit: I also had a problem with me being able to interact with objects behind walls. Any fixes?

    • @alvinjunier6644
      @alvinjunier6644 2 года назад +4

      He didn't expleind anything about crosshair. And that might be because of the length of the raycast. You can make it so it has a maximum length and if it hits a target it will get shorter so it can't get trough walls. Like:
      Than:
      PLAYER raycast WALL Interactable PLAYER ray WALL cast Interactable PLAYER raycast WALL Interactable
      When you make the cange:

      PLAYER raycast WALL Interactable PLAYER ray WALL Interactable PLAYER raycast WALL Interactable

    • @iSilleNcN
      @iSilleNcN 2 года назад +3

      The crosshair is pretty easy. way I did it was made a child to the crosshair called "Crosshair_Center" and made it look how I wanted. In the PlayerInteract.cs script I made a public variable for an image to assign this to then set imagevariable.enabled = false; in START and in UPDATE just after you update the playertext in the Physics.Raycast call you will set enabled to true and then make an else statement after the Physics.Raycast call and set it back to false. This will allow the image to be enabled when you look at an interactable and then false when not looking at one.

    • @meleeplaysgames
      @meleeplaysgames 11 месяцев назад

      For the bug with raycasts, i just selected interactables and default for the layers

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

    I'm really wait a new video!

  • @blazesmiless
    @blazesmiless Год назад +6

    Hey Natty! Clean tutorial you made for us, it's been 3 Months. And also is this the last part of the series or is there still more parts? If there is more parts, please upload a little more often. Thanks!

  • @DJDedBeat
    @DJDedBeat 3 месяца назад +1

    busy few weeks? the last video in the playlist was 2 years earlier LOL

  • @futurewitness9162
    @futurewitness9162 2 года назад

    Would you be able to go over UI navigation using the new Input System? Like pressing escape to bring up a pause menu? I'm having trouble replicating what you've shown in the first two videos to objects not in an in-game scene.

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

      Use events! To the canvas, add your event script and add your pausemenu into the event script box(you know what I mean) and choose SetActive which should be in the GameObject one

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

    Man i relly loved your first video and i followed all the steps, but if u do not continue the series how are we going to be able to eat your knowlegeand achieve what you did =( .

  • @longtantran7525
    @longtantran7525 2 года назад

    More plss :3

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

    Will you please do a video on scripting the gun you are using in some of your videos?

  • @Emerald_Dev
    @Emerald_Dev 2 года назад

    Please make the next episode!

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

    Hello! Will you continue to this series?

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

    after getting rid of the old stuff in the player health script, it gives me a bunch of compiler errors, how do i fix this?

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

    When is the next video coming out, its been like 3 months :(

  • @kratoszeus61
    @kratoszeus61 2 года назад

    Please make another tutorial for Enemy AI

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

    When is the next episode coming out?

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

    Seriously, when are you going to upload a new part of the series? Its been like 5 months now.

  • @lexeralam-am790
    @lexeralam-am790 Год назад

    I cannot find the event only interactable in the add component sir...

  • @passionpranju370
    @passionpranju370 10 месяцев назад

    hii @Natty GameDev ig u should give us some downloads of the damage image like u game it in the health bar one

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

    where did thecrosshair-interact come from?

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

    are all your sprites free to use?

  • @prod.nauman
    @prod.nauman Год назад

    we want the next vid pls

  • @user-gh4oc6gr1h
    @user-gh4oc6gr1h Год назад

    how did he make the number to go down with the damage

  • @LJTvr_Official
    @LJTvr_Official 11 месяцев назад +2

    At 2:01 when I add The Event only Interactable it makes Thousands of "Interaction Events"

    • @rain2767
      @rain2767 10 месяцев назад +2

      you should make checking if there's more than 1 instance of the script, he did that in the previous video.

  • @evanropchan27
    @evanropchan27 2 года назад +1

    will you ever make a tutorial for title screens for this project?

    • @NattyGameDev
      @NattyGameDev  2 года назад

      Yes menus will be part of this series. Probably more towards the end of the series but we will cover how to setup menus :)

    • @alvinjunier6644
      @alvinjunier6644 2 года назад +1

      @@NattyGameDev Can you give us a date for the next episode

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

    does anyone have a health bar similar to this because i cant find a good one anywhere. Thanks

  • @danial1276
    @danial1276 2 года назад

    Hi, may i ask where is the event only interactable script for the DamagePlayer cube? ive been followed ur tutorial but seems i cant find it, can you answer this thanks !

    • @YexyIsSexy
      @YexyIsSexy 2 года назад

      a bit late, but the info for this is all in the part 2.5 video that he did. ruclips.net/video/_UIiwzfZoZA/видео.html
      Hope this helps :)

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

      We made that in a recent tutorial, not this one. This is a series

  • @haveafuntime
    @haveafuntime 3 месяца назад

    can you put the overlay in a link in the description pls

  • @sodge
    @sodge 2 года назад

    Yo, where is that new video, we've been waiting here.

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

    When did he added these scripts? If so please show me what you put in these new scripts

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

    I need help making an intensity variable i can edit in the inspector just like duration and fade speed. Intensity meaning the alpha intensity per repeat. Also making it stack with each cycle would be great. So all in all i need help making it so that when you take damage the alpha goes up by this intensity amount still being effected by the fade speed and duration but if you take damage before duration is up duration will reset and alpha will go up even more.

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

      The intensity variable is just changing the "1" in TakeDamage overlay.color to intensity and add "public float intensity" to the variables.

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

      ​@@DarioMarken ohh dope thanks

  • @jonnyash9847
    @jonnyash9847 5 месяцев назад

    I dont see a video on how you added the Interactable ability to bind it to any game object (player)s functions? In this case you made an interactable on interact call the players take damage function? How do you do that I cant find a method to online anywhere? I have my interactable script as an abstract that has a prompt message correctly but doesnt have a ability to get any function from another object? Also is this on github anywhere? would make this alot easier

    • @user-hi3jb1js3m
      @user-hi3jb1js3m 2 месяца назад

      @@BlazeByteGamingYT Can you tell me exactly where it is? Is there a three-snippet code shown at the end of the video? I'm a Unity beginner and my English isn't very good, I hope you tell me, thank you~

  • @user-gh4oc6gr1h
    @user-gh4oc6gr1h Год назад

    where did "[Header("Health Bar")]" come from

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

    3:38 leaving a mark

  • @user-gl7gj5mq2n
    @user-gl7gj5mq2n 11 месяцев назад +1

    We didnt have any health text?

  • @SirGeneral
    @SirGeneral 6 месяцев назад

    What extensions do you use for the "autocomplete"? Like, the language

    • @alfacedolidl6236
      @alfacedolidl6236 5 месяцев назад +1

      Visual Studio

    • @SirGeneral
      @SirGeneral 5 месяцев назад

      Not the software, I mean I already have that , but I meant the extensions that change the clolours. I installed the unity extension and some other but it didn't do the same@@alfacedolidl6236

  • @mustafakaba404
    @mustafakaba404 6 месяцев назад

    how can i find damage screen?

  • @benjayt1077
    @benjayt1077 2 года назад

    In ep en my player moter is not working

  • @saeg
    @saeg 2 года назад

    Do you think you could add recoil to guns please?

    • @NattyGameDev
      @NattyGameDev  2 года назад +2

      We will be adding recoil to weapons when the Weapons tutorial comes out! :)

  • @stinger59605
    @stinger59605 2 года назад

    can you put the script in the discription?

  • @alvinjunier6644
    @alvinjunier6644 2 года назад +3

    When will you upload the 4th video ?

  • @redbullXfight3r
    @redbullXfight3r 2 года назад

    Why didn’t you finish this series, this makes me so sad

  • @rarisninja461
    @rarisninja461 5 месяцев назад

    where do you find the event only interactable?

  • @yt-spikegaming7394
    @yt-spikegaming7394 Год назад

    how did you put that health bar on screen in front of cameraaaaaa

  • @r.sanjeevkumar2088
    @r.sanjeevkumar2088 2 года назад

    new vid pls
    i am following your tutorial

  • @user-me3jm1ks6t
    @user-me3jm1ks6t 2 года назад

    Please, help. How to recreate that blood effect 3:40?

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

      look for a picture on google that looks alike if its to hard
      ex: d3kjluh73b9h9o.cloudfront.net/original/3X/d/f/df45c22946e95839e34240651bf0d9ae208431d3.png

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

    when a new part?

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

    The Event Only Interactable component doesnt show up in my unity

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

      me neither

    • @LJTvr_Official
      @LJTvr_Official 11 месяцев назад

      It was a script that was made in a different tutorial earlier in the playlist

  • @evanropchan27
    @evanropchan27 2 года назад +1

    how do I import the health bar from the previous vid to this project?

    • @NattyGameDev
      @NattyGameDev  2 года назад

      You will have to follow the previous video first then move onto this video. Keep in mind when you reach the point of testing the TakeDamage() function using Input.GetKeyDown it won't work with the new input system (we cover that in this video)

    • @evanropchan27
      @evanropchan27 2 года назад

      @@NattyGameDev I have Followed that video and completed my health bar but I am not sure of how to take my already made health bar and put it into this project?

    • @NattyGameDev
      @NattyGameDev  2 года назад

      You can drag the script into the new project. Then you will need to set up the UI elements again... Otherwise.. make it a prefab, and drag the prefab + all linked assets into the new project

    • @evanropchan27
      @evanropchan27 2 года назад

      @@NattyGameDev thank you so much :D keep up the good work

    • @NattyGameDev
      @NattyGameDev  2 года назад

      No just the things related to the UI.. you can drag the script on the player and then drag all the UI back onto the slots on the PlayerHealth component

  • @risen4219
    @risen4219 2 года назад

    can we have the source code

  • @benjayt1077
    @benjayt1077 2 года назад

    My player moter Will not go in to player

    • @owenhilton8054
      @owenhilton8054 2 года назад

      does it inherite from Monobehavior? and it it a normal class or have you put it as an abstract class?

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

    Player health script???

  • @user-ou2ye1og8d
    @user-ou2ye1og8d 11 месяцев назад

    where is Damage overlay? skip?

  • @rezoanhoshen2640
    @rezoanhoshen2640 2 года назад

    I thought he would be a goner after previous 3 videos

  • @geldregen
    @geldregen 2 года назад

    Can you make fps battle royale?

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

    the damage does not work!!!!!!😤😤😤😤😤😤😤😤😤😤😤😤

    • @Marm1803
      @Marm1803 10 месяцев назад

      Hi, if you're still having problems with this, I fixed it mine.
      I created an InteractionSetup script.
      public class InteractionSetUp : Interactable
      {
      protected override void Interact()
      {

      }
      }
      then attached it to my block. Use it in a similar way to the door and cake script and it works perfectly. That little script will work on anything interactable

  • @gameadhyanstudio1410
    @gameadhyanstudio1410 2 года назад

    Fourth

  • @ItsNetworking
    @ItsNetworking 2 года назад

    Can you unban me from your discord server? ...

    • @NattyGameDev
      @NattyGameDev  2 года назад +1

      I will revoke the ban, but please read and follow the server rules. :)

  • @saurn1221
    @saurn1221 2 года назад

    Dead or wot?