#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! - Игры
Thanks so much for the new video. It's really needed since the old one was getting a bit outdated! Nice vid
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.
This is really exciting stuff to learn, one of the best tutorials i've done!
Thank you for your work, very helpful!!
Cant wait for next one! I'm curious about the weapon animations, projectiles, etc.
me too
Wow, it turned out to be continued again, I'm very happy, I'm waiting for the next video
You are a beast man thank you so much!!
looking forward to the next one. totally hungry for more
Thanks for tutorial, hope see u next videos!
looking forward for next one. This is good quality content course .
cant wait for the next part!
i am exited to learn moreeee
Cant wait to see the next Video of this awesome series.
yes its been 4 months
Thank you very much
Thanks a lot man!!!!!!
THIS IS SO GOD DAMN COOL
Awesome, a fairly recent tutorial for Unity. Keep it up man!
*Edit: i meant very and not fairly :)
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
Thank you keep up the good work
He didn’t keep up the good work
Thank you
He Back 🤩
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!
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! :)
You forgot to add this video to the "Lets make a fps game in unity" Playlist!!
Thanks for letting me know!!
@@NattyGameDev :)
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
He's back
@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
Dear Natty, can you please upload a video with the enemy ai please i love your videos so much❤
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?
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
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.
For the bug with raycasts, i just selected interactables and default for the layers
I'm really wait a new video!
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!
busy few weeks? the last video in the playlist was 2 years earlier LOL
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.
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
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 =( .
More plss :3
Will you please do a video on scripting the gun you are using in some of your videos?
Please make the next episode!
Hello! Will you continue to this series?
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?
When is the next video coming out, its been like 3 months :(
Please make another tutorial for Enemy AI
When is the next episode coming out?
Seriously, when are you going to upload a new part of the series? Its been like 5 months now.
I cannot find the event only interactable in the add component sir...
hii @Natty GameDev ig u should give us some downloads of the damage image like u game it in the health bar one
where did thecrosshair-interact come from?
are all your sprites free to use?
we want the next vid pls
how did he make the number to go down with the damage
At 2:01 when I add The Event only Interactable it makes Thousands of "Interaction Events"
you should make checking if there's more than 1 instance of the script, he did that in the previous video.
will you ever make a tutorial for title screens for this project?
Yes menus will be part of this series. Probably more towards the end of the series but we will cover how to setup menus :)
@@NattyGameDev Can you give us a date for the next episode
does anyone have a health bar similar to this because i cant find a good one anywhere. Thanks
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 !
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 :)
We made that in a recent tutorial, not this one. This is a series
can you put the overlay in a link in the description pls
Yo, where is that new video, we've been waiting here.
When did he added these scripts? If so please show me what you put in these new scripts
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.
The intensity variable is just changing the "1" in TakeDamage overlay.color to intensity and add "public float intensity" to the variables.
@@DarioMarken ohh dope thanks
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
@@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~
where did "[Header("Health Bar")]" come from
3:38 leaving a mark
We didnt have any health text?
What extensions do you use for the "autocomplete"? Like, the language
Visual Studio
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
how can i find damage screen?
In ep en my player moter is not working
Do you think you could add recoil to guns please?
We will be adding recoil to weapons when the Weapons tutorial comes out! :)
can you put the script in the discription?
When will you upload the 4th video ?
Why didn’t you finish this series, this makes me so sad
where do you find the event only interactable?
i cant find either
how did you put that health bar on screen in front of cameraaaaaa
nvm i figured it out 😂😅
new vid pls
i am following your tutorial
Please, help. How to recreate that blood effect 3:40?
look for a picture on google that looks alike if its to hard
ex: d3kjluh73b9h9o.cloudfront.net/original/3X/d/f/df45c22946e95839e34240651bf0d9ae208431d3.png
when a new part?
The Event Only Interactable component doesnt show up in my unity
me neither
It was a script that was made in a different tutorial earlier in the playlist
how do I import the health bar from the previous vid to this project?
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)
@@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?
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
@@NattyGameDev thank you so much :D keep up the good work
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
can we have the source code
My player moter Will not go in to player
does it inherite from Monobehavior? and it it a normal class or have you put it as an abstract class?
Player health script???
where is Damage overlay? skip?
I thought he would be a goner after previous 3 videos
Can you make fps battle royale?
the damage does not work!!!!!!😤😤😤😤😤😤😤😤😤😤😤😤
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
Fourth
Can you unban me from your discord server? ...
I will revoke the ban, but please read and follow the server rules. :)
Dead or wot?