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)
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.
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.
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.
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.
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!
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.
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.
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?)"
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.
@@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.
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.
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 /:
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 :)
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.
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...
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.)
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.
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!
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.
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?
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?
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.
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?
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
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!
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
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
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.
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
Welp, in the next video we're gonna add s when you take damage so it's gonna look like you took damage when you pick up the heart. Also don't forget to write gameObject.SetActive(false) otherwise you'll fill up your health infinitely
@@Reham9000 Good for you, you can make it work for sure. I'm just saying that the majority of people who follow the tutorial are going to run into problems if they do that. If you're good enough to find solution then that's great, feel free to experiment and change anything!
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
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
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 ?
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
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!!
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.
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🙏
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)
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?
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.
I wonder if "if statement" neglect boolean condition for once when the game start although we didn't assign any value to them.(eg.bool dead in player's Health script and bool movingLeft in saw's Sideways script.) Btw, thanks a million for the tutorials.Hope u having an amazing day!
Ultra late reply, sorry. If you don't specifically assign a value to a bool variable it's gonna be false when you start the game. The same with numbers, they're gonna be 0.
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
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.
I don't know if anyone will see this but I really need help right now. How to set the health bar to stay within the visible area of the game screen, even when the player character moves close to the edges of the scene? Since in previous video I use the camera follow movement one instead so now the healthbar is kinda stuck with the camera movement. Which leading to the healthbar to get out of frame when the character moves too close to the edges. (I'm sorry in advance since eng is not my first language)
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.
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!
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
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)
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.
@@MusicFlowDaily Highly appreciated, very glad I'm helping. Let me know if you have any issues.
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.
is this some kind of sick joke
@@baseddino huh?
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.
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.
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
Thanks forever
Thank you very much, man! Your help to grow future game developers is invaluable
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?
Yes, episode 8 will be about iFrames and 2 new types of enemies.
I Lost Intrest in Unity few months ago but this tutorial is regerating my Intrest. Thank you for this best content! Love You
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!
Thanks a lot, good luck with it and let me know if need help :)
oh man, it's Zelda's health system. So cool. I love it
A new Brackeys is here! Thank you!
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.
Not gonna lie ..i am just watching this one...and its so cool...its just PERFECT MAN!..THANKS A TON
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.
If anyone has a problem with the Saw not moving, just set MovingLeft bool as true and that should be it.Btw great tutorials
This video is absolutely underrated , Thanks for good tutorial
Thank you very much for these courses you have done here. It makes me very eager to do projects with unity.
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?)"
You need to add using UnityEngine.UI, check it out here 7:58
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..
@@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.
@@PandemoniumGameDev thanks i had the same error
@@abhisavale5231 same haha
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.
Id love to send it to you on discord if you were up for it
In this case check your if statement. I think you set are checking currentHealth
@@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.
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.
your tutorials make it simple and fun to learn unity!
If you want the "die" animation to look better then just add "None" sprite in the last key of die animation 😄
I have added the die animation but I'm not getting in the game
You could change position of saw just by adding sinus function of time to initial saw position, but your approach is also good
thx a lot! i also added a weak heart that gives you a half a ordinary heart! :) :) :)
such a good video, also your pacing is fine, I watch your videos on 1.5x sometimes 1.75x speed haha.
I also think it's a bit slow, but hey I'm not a beginner 😁
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!
Really really thanks for making these videos... It really helps in understanding the topic
Thank you for making these videos! They're a lot of help
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 /:
someone else had the same problem you need "using UnityEngine.UI;"
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 :)
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.
A big help for me was:
[SerializeField] private KeyCode left;
this permits you to get inputs from specific keys at one time
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...
Good suggestion
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.)
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.
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 :)
@@scorpiusjones5436same issue here
I think i can just go on.
God helps😂
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
I miss the "Mission passed. Respect +1" outro. It was really rewarding.
Gotta bring it back for future videos
this is the most organized thing ever
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!
Awesome, you're a champ!
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.
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?
"I really love you, man. If someday you come to Argentina, I'll invite you to an 'Asado'."
Best thing I heard in a while, thank you!
Thank you so much for this video!
finally finished this point
Well done tutorials. Thank you.
Glad it was useful, thanks for watching them!
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?
I have the exact same problem! And yeah it did break the game
Same problem
Same problem god hellllp
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.
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
This is an amazing tutorial! 10/10
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?
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
when did he change the transitions from idle - attack to anystate - attack? did i miss something?
Same problem
bruhhhh. same problem
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!
Check the Z position of the saw object, it's supposed to be 0.
@@PandemoniumGameDev thank god i had the same issuse right now, love the tutorials btw helping me alot
Thank you my RASSIAN friend!
😂I'm not russian, although I'm very glad to help!
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).
Works Great!
I’m having trouble getting the heart to add health 😢. All the code looks exactly the same to me. Please helppp
thank you for helping me from uas, glad i fnd this channel
Glad you found it too! Good luck learning
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
had this issue too but then I turned exit time to 0 and transition duration to 0 which resolved the issue for me.
don't worry, that's normal because you don't have a death animation yet and "zaros3433k" (the previous reply) is probably right
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.
i need the answer too XD
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
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.
17:50 hahaha I laughed so hard, I can’t wait for the next video tutorial
Hi I just can’t see the hearts in the game scene can anyone help me with that everything else is fine.
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
Great video bro
I got an error saying for the healthbar at script saying that’s there’s no image origin what do I do??
at 8:02 type using unity engine .ui at the top it should fix it
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
Thanks for the help
Great Video👍Helped me out al lot❤
I don’t have any anchor presets icon or menu when setting the anchor
Thank you so much
22:12 Dont Write all what He said insted write this
if(collision.tag == "Player")
{
collision.GetComponent().TakeDamag(-healvalue);
}
and this should work
Welp, in the next video we're gonna add s when you take damage so it's gonna look like you took damage when you pick up the heart.
Also don't forget to write gameObject.SetActive(false) otherwise you'll fill up your health infinitely
@@PandemoniumGameDev look i fixed it its easy i just add a new animiton for healing
😃
@@Reham9000 Good for you, you can make it work for sure. I'm just saying that the majority of people who follow the tutorial are going to run into problems if they do that. If you're good enough to find solution then that's great, feel free to experiment and change anything!
my player is not taking damage from saw ; after enabiling isTrigger on in saw; pls help me out
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
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
Did you ever find an answer to this? Facing this issue now.
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?
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 ?
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
Did you find the fix as ive got the same error?
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!!
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.
@@PandemoniumGameDev Thanks for answer!
A reminder if the health bar doesn't work for you: Link the scripts to your player!
And then link things to the script (images, health)
my die animation doesnt work I did everything you do but it doesnt trigger the animation
So how would I be able to make a health bar without the filler tool, specifically using different images every time I take damage
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🙏
in the script, what was the image private? I tried to do it and it said the the namespace couldn't be found
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)
I just made Animator public from private in Health script and somehow it worked!! IDK what happened ? Could you explain me ??
i have the same problem wdym you set animator to public how did u do that
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?
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?
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.
In the healthbar script "Image" is giving me an error as it could not be found
Check out the pinned comment
Hello, i want to ask why did the saw disappear on game but it's appear on scene, it became invisible deadly trap
I wonder if "if statement" neglect boolean condition for once when the game start although we didn't assign any value to them.(eg.bool dead in player's Health script and bool movingLeft in saw's Sideways script.)
Btw, thanks a million for the tutorials.Hope u having an amazing day!
Ultra late reply, sorry. If you don't specifically assign a value to a bool variable it's gonna be false when you start the game. The same with numbers, they're gonna be 0.
@@PandemoniumGameDev thanks , appreciate it
Great Video :D
Thanks Stig 🥳
my health bar aint taking damage can someone please help me ive tried everything
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
Thanks!
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
2 months gone by and im still stuck on this error
omg fixed it under private void awake i put anim.GetComponent(); instead of anim = GetComponent(); idk weather to be sad or happy rn
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.
so when i downloaded this project and open and played in unity fireballs weren't working it just showed some animation
I don't know if anyone will see this but I really need help right now. How to set the health bar to stay within the visible area of the game screen, even when the player character moves close to the edges of the scene? Since in previous video I use the camera follow movement one instead so now the healthbar is kinda stuck with the camera movement. Which leading to the healthbar to get out of frame when the character moves too close to the edges. (I'm sorry in advance since eng is not my first language)
in canvas object go to canvas scaler and set scale with screen size
i did everything that you did and in the final, when i try to pickup the heart, he don't dissapear..
My Healthbar script, has an error, It shows error C0246: Type or namespace name "image" could not be found
Something is wrong with the script whenever I am trying to make an enemy to do damage to me it doesn't work.
thanks alots ❤️
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.
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!
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
how about player respawn code?