Thanks for watching, I wish I knew about Animation Events a lot earlier than I did so I hope this video helps out some beginners if they have never heard about them before.
Thanks! Somehow did not notice this option in the animation window at all.Gonna use it to play step sounds, much better that creating a separate audio source with loop and enabling/disabling it on state enter/exit by animation script.
OHHH MY GOD! I watched a huge amount of tutorials but always missed the part where you should select object, until you just said it in video! THANK YOU VERY MUCH!
I did the same thing when I was trying to learn to use them as well, wondering why I couldnt see the public methods when selected the Event. Glad it helped.
Thanks very much. I've been trying to figure out this all afternoon and evening. Non convoluted and precise. Thanks for stopping me on working through to the early morning.
That was excellent. Imported animations being unable to have an event added seems designed to trip us up. Duplicating the animation and reassigning was the perfect fix. Also explaining how to assign functions with the drop down only showing after the players is clicked on, again something only learned through experience. Thanks for this thoughtful tutorial.
Thanks, yeah that part about not seeing the drop down if the object is not selected really confused me when I first learned about them. That part was not mentioned so I want to make sure it was very clear. Glad it helped.
If I remember correctly, even if the animation is read-only you can still add an animation event. I’ve done this by clicking on the model that has the animation then in the inspector, I just scroll down to where “Event” is. From there, I can add what animation I want without duplicating the animation. I did it with an FBX file though
Interesting, I will try that next time to see. I find anything to do with models and animations in Unity there are several different ways to accomplish the same thing. I never noticed that spot though but it makes sense. Thanks.
@@MetalStormGames you’re welcome. Just one thing I forgot to mention is that it is on the FBX model with the animation that is in the project folder. Not a prefab nor an object in the scene.
Amazing guide, I'm gonna use this for my next project. Question though, why do you need to make a public method to access the AttackSequence() method when it looked like you could access it straight from the animation event even though it's private?
You know I am not actually sure if it needs to be private or not, if it works as private then yeah I would definitely go that route. I cant confirm as dont have Unity available right now but yeah I would just test it out and if private works then that is a much better option.
Thanks for this. Much appreciated. Hey. Can you do a tutorial on instantiating a different prefab everytime heath meter decreases/ increases every 25%? Can you also do one on playing a different animation each time health meter decreases/increases every 25% as well?
Thanks for watching, I can add that to the list but all you really need to do for the instantiating one is just use Random.range for the index of an array of game objects that you want to instantiate and it will pick a random one each time. For the random animation one you could call the Animator.Play method and pass in a string of the animation name that you want to play.
That what i love to see . But i have the question regarding to this. Events animation Is the same method of function? I mean you can just declare events as a string without necesarly add a function
I am not sure if I am understanding you correctly but yes you can put in an event that does not actually exist and that will usually give an warning in the console when you run the game and it plays that animation saying that the method could not be found or something similar to that.
@@MetalStormGames i remember that you can declare events directly from animation for example i'm gonna write step events and declare It directly inside the script. For example in your case It was public void AttackAnimator() But what i mean is public void Attack animator as events inside animation
I think I know what you mean but not sure, if so then yes you can also add events inside the animator as well as animator states that can control them. Let me know if it all works out for you! good luck.
@@MetalStormGames yes absoloutely work great both of them. I think it's used to not duplicate animation even If they're read only. Btw very good video thank you.
The license from all of the assets does not allow me to but I can look in to that in the future if people prefer it with basic primitive assets instead so I can do that. Sorry.
If you have questions feel free to ask or even hop on my discord if you want the link is in the video description and i can try answering questions when I am around. Once you do one or two animation events though it usually starts to make sense and you will probably use them quite often as they are very handy.
@@MetalStormGames Dear Metal Storm, In my scene I got my FPS Character Controller (the player) and my Zombie following the FPS Character Controller with script, and I added a attack trigger so when the FPS Character Controller gets close the zombie attacks the FPS Character Controller at 4.0 Stopping Distance. So all I need to do is the health bar goes down when the zombie attacks the FPS Character Controller, does anyone know any tutorials that show the C# Visual Studio code or in Bolt Visual Scripting to make the health bar go down when the zombie attacks the FPS Character Controller? Or can anyone walk me through it on Unity 3D? I cannot find any CZcams tutorials on a health bar going down when a enemy attacks the FPS Character Controller, in the tutorial they just talk about the health bar going down when the space bar is pressed, or the health bar changing color's as it goes down. Can you make this CZcams tutorial for me, I am sure it will help lots of other people with making their video games? Also can you make a Bolt Visual Scripting CZcams Tutorial with like a split screen of what is going on in the Graph Inspector with the nodes connected, and what it is making an object do in the scene simultaneously? So you would simultaneously show 2 screens one with the Graph Inspector, and another screen showing the behavior of the object in the scene really quickly in like a fast montage of split screen clips, so people can learn Bolt Visual Scripting fast, and find what they are trying to code quickly. I think this would make a great CZcams tutorial and teach people so quickly, can you make a CZcams tutorial like this? this should get you more views, more subscribers, and more money.
I have never used Bolt so I cant help there at all, for the health thing though just make a health variable on your player that gets a damage value subtracted when you collide with the zombie, then when that is working make a health bar and link the 2. Brackeys has a very beginner friendly health bar tutorial video that shows how to set it up and link. There are tons of basic health bar videos for Unity but I would recommend either the one on Brackeys channel or the one on CodeMonkeys channel. Hope it helps.
Down the road I want to make a health bar video but it wont be for quite a while, I am also trying to work on making a complete beginner course as well but that is going to take quite a bit of time yet before it is ready.
@@MetalStormGames thank you metal storm, I am having a real hard time finding a video on this health bar goes down when enemy attacks the FPS Character Controller script. I am learning coding day by day, but even the best programmers do not know all scripts, and nodes in Bolt.
Thanks for watching, I wish I knew about Animation Events a lot earlier than I did so I hope this video helps out some beginners if they have never heard about them before.
Thanks! Somehow did not notice this option in the animation window at all.Gonna use it to play step sounds, much better that creating a separate audio source with loop and enabling/disabling it on state enter/exit by animation script.
And you could match it up exactly with the right frame when the animation of the foot hits the ground this way.
Thankyou so much!! I had an error and couldn't figure it out for a whole day, until watching this 😅
Glad it helped and thanks for watching
OHHH MY GOD! I watched a huge amount of tutorials but always missed the part where you should select object, until you just said it in video! THANK YOU VERY MUCH!
I did the same thing when I was trying to learn to use them as well, wondering why I couldnt see the public methods when selected the Event. Glad it helped.
Thanks very much. I've been trying to figure out this all afternoon and evening. Non convoluted and precise. Thanks for stopping me on working through to the early morning.
Great to hear that it helps. Thanks
That was excellent. Imported animations being unable to have an event added seems designed to trip us up. Duplicating the animation and reassigning was the perfect fix. Also explaining how to assign functions with the drop down only showing after the players is clicked on, again something only learned through experience. Thanks for this thoughtful tutorial.
Thanks, yeah that part about not seeing the drop down if the object is not selected really confused me when I first learned about them. That part was not mentioned so I want to make sure it was very clear. Glad it helped.
Awesome dude, very straightforward illustration of a feature. It helped me out. Thank you.
Thanks for watching and glad it helped. They can be very useful.
Short and clear explanation! Thanks!!
Glad it was helpful! Thanks for watching
I'm so stupid, I forgot to click at the player object. 4:40
Great vid
I still do that on a regular basis and always forget, even when you know to check that its so easy to forget.
You just saved me a lot of trouble, thanks.
Very clear thanks
Thank you for watching
This was very helpful. Thanks!
Great to hear, thanks for watching
Liked and subscribed. Explained like a pro!
Much appreciated!Thank you for watching
magnificent tutorial!
thank you!
Thank you very much and thanks for watching
good bro
very good
thank you sir
thank you very much
Thank you for watching
Thank you so much for the video!
Thank you for watching, glad it helped out.
thanks dude :D
Thank you!!
You're welcome!
If I remember correctly, even if the animation is read-only you can still add an animation event. I’ve done this by clicking on the model that has the animation then in the inspector, I just scroll down to where “Event” is. From there, I can add what animation I want without duplicating the animation. I did it with an FBX file though
Interesting, I will try that next time to see. I find anything to do with models and animations in Unity there are several different ways to accomplish the same thing. I never noticed that spot though but it makes sense. Thanks.
@@MetalStormGames you’re welcome. Just one thing I forgot to mention is that it is on the FBX model with the animation that is in the project folder. Not a prefab nor an object in the scene.
Amazing guide, I'm gonna use this for my next project. Question though, why do you need to make a public method to access the AttackSequence() method when it looked like you could access it straight from the animation event even though it's private?
You know I am not actually sure if it needs to be private or not, if it works as private then yeah I would definitely go that route. I cant confirm as dont have Unity available right now but yeah I would just test it out and if private works then that is a much better option.
@@MetalStormGames 👍👍
thanks
You're welcome!
the problem is that i am instancing dynamically characters so i can't just link an object reference like this
Not sure exactly what you mean or what you are doing but perphaps animation events are not what you are looking for then?
Thanks for this. Much appreciated. Hey. Can you do a tutorial on instantiating a different prefab everytime heath meter decreases/ increases every 25%? Can you also do one on playing a different animation each time health meter decreases/increases every 25% as well?
Thanks for watching, I can add that to the list but all you really need to do for the instantiating one is just use Random.range for the index of an array of game objects that you want to instantiate and it will pick a random one each time. For the random animation one you could call the Animator.Play method and pass in a string of the animation name that you want to play.
That what i love to see . But i have the question regarding to this. Events animation Is the same method of function? I mean you can just declare events as a string without necesarly add a function
I am not sure if I am understanding you correctly but yes you can put in an event that does not actually exist and that will usually give an warning in the console when you run the game and it plays that animation saying that the method could not be found or something similar to that.
@@MetalStormGames i remember that you can declare events directly from animation for example i'm gonna write step events and declare It directly inside the script. For example in your case It was public void AttackAnimator()
But what i mean is public void Attack animator as events inside animation
I think I know what you mean but not sure, if so then yes you can also add events inside the animator as well as animator states that can control them. Let me know if it all works out for you! good luck.
@@MetalStormGames yes absoloutely work great both of them. I think it's used to not duplicate animation even If they're read only. Btw very good video thank you.
Can you upload the full project?it's hard to understand without debug it local.
The license from all of the assets does not allow me to but I can look in to that in the future if people prefer it with basic primitive assets instead so I can do that. Sorry.
@@MetalStormGames thanks for your answer and video.I'll try my best to understand it
If you have questions feel free to ask or even hop on my discord if you want the link is in the video description and i can try answering questions when I am around. Once you do one or two animation events though it usually starts to make sense and you will probably use them quite often as they are very handy.
Hi metalstorm games,
do you take tutorial requests?
I need help.🤕
I am not sure if I would be able to do everything but let me know what it is and it is definitely possible.
@@MetalStormGames Dear Metal Storm, In my scene I got my FPS Character Controller (the player) and my Zombie following the FPS Character Controller with script, and I added a attack trigger so when the FPS Character Controller gets close the zombie attacks the FPS Character Controller at 4.0 Stopping Distance.
So all I need to do is the health bar goes down when the zombie attacks the FPS Character Controller, does anyone know any tutorials that show the C# Visual Studio code or in Bolt Visual Scripting to make the health bar go down when the zombie attacks the FPS Character Controller? Or can anyone walk me through it on Unity 3D? I cannot find any CZcams tutorials on a health bar going down when a enemy attacks the FPS Character Controller, in the tutorial they just talk about the health bar going down when the space bar is pressed, or the health bar changing color's as it goes down. Can you make this CZcams tutorial for me, I am sure it will help lots of other people with making their video games?
Also can you make a Bolt Visual Scripting CZcams Tutorial with like a split screen of what is going on in the Graph Inspector with the nodes connected, and what it is making an object do in the scene simultaneously? So you would simultaneously show 2 screens one with the Graph Inspector, and another screen showing the behavior of the object in the scene really quickly in like a fast montage of split screen clips, so people can learn Bolt Visual Scripting fast, and find what they are trying to code quickly. I think this would make a great CZcams tutorial and teach people so quickly, can you make a CZcams tutorial like this?
this should get you more views, more subscribers, and more money.
I have never used Bolt so I cant help there at all, for the health thing though just make a health variable on your player that gets a damage value subtracted when you collide with the zombie, then when that is working make a health bar and link the 2. Brackeys has a very beginner friendly health bar tutorial video that shows how to set it up and link. There are tons of basic health bar videos for Unity but I would recommend either the one on Brackeys channel or the one on CodeMonkeys channel. Hope it helps.
Down the road I want to make a health bar video but it wont be for quite a while, I am also trying to work on making a complete beginner course as well but that is going to take quite a bit of time yet before it is ready.
@@MetalStormGames thank you metal storm, I am having a real hard time finding a video on this health bar goes down when enemy attacks the FPS Character Controller script. I am learning coding day by day, but even the best programmers do not know all scripts, and nodes in Bolt.
This is helpful but you could explain this in 10 seconds.
There are many other videos that do, I wanted to go through it a bit more for the people that need a slower explanation with real example.