The combat system doesn't work after I built my project. The player character doesn't respond after the attack input. But it works fine in the Unity Editor. Any ideas why?
@iop31318 күн бұрын
Yea it happend time to time to me also U need more updated videos u can try one of two things 1. typing ur own code (The some thing could happend) 2. finding more updated tutorial when unity tutrial get 2years or much older it don't working usally even visual tell u all good (But tip for me check ur unity project be4 u deleting ur code maybe something there is worng)
@ivomaayne91833 ай бұрын
I NEED to know what Visual Studio theme this is- it looks awesome
@gustavosouza5303 ай бұрын
Hey, so, i'am having a bit of a problem woth the state machine acttack that you developed, i've literaly copied your script to the coma, but my unity keep givinng me this message " NullReferenceException: Object reference not set to an instance of an object ComboCharacter.Update At cs 22 " , do you now why ?
@lyricaldemon25374 ай бұрын
Not well explain...all my Code getting errors till I decide to delete all of them and Find a Vedio that best suits me 🙄
@lyricaldemon25374 ай бұрын
All i get is Errors
@kwombat53064 ай бұрын
bro is black! smashed that like button
@SuperCiggieBlower5 ай бұрын
Wow, great channel, you are super professional. I'm a beginner game developer and I just made my first 2D platformer in Unity SuperCiggieBlower, available for download on Google Play and under every video on my YT channel. I would be very grateful if you tell me what you think about it. Keep doing what you're doing and I'm sure you'll be successful on YT soon. Take care😀
@andersonoliveiramagalhaes17855 ай бұрын
What a smart Young man, thanks
@Xinnou5 ай бұрын
fucking legend, this is so well done
@AaronAsherRandall5 ай бұрын
My dude this is soooo good! Instant sub!
@greyscarlett1755 ай бұрын
The G.O.A.T is back !!
@ICanAshureU5 ай бұрын
First
@bobbob98216 ай бұрын
Is it good practice to create fsms for every child object that adds a gameplay mechanic? Like if you had a weapon you'd probably want to have a state machine attached to the "weapon slot".
@SMHillDev6 ай бұрын
I wouldn't necessarily say it's good practice. Although fsms are helpful you also don't want to over Engineer a problem. Although you could use it for that, using it for a weapon slot might not be a good/better solution over a traditional inventory system
@miloobote89496 ай бұрын
In the ComboCharacter file I keep getting errors for meleeStateMachine.CurrentState. It tells me the object reference is not set to an object. If I already instatiated the object meleeStateMachine as a private object how could it not exist? Please help I think Im close because when I comment out the reference to meleeStateMachine I am able to get attack 1 out by clicking.
@ImportantClips26 ай бұрын
Did you find a solation
@SMHillDev6 ай бұрын
Hey, wanted to make this pinned to first say thanks for all the support on the video! I'm planning on making more content like this and content in general very soon. I would also like to clarify an issue I've seen with builds. I didn't run a test build verifying the system (rookie mistake I know) so you might see these. - The OnValidate function doesn't get called inside of builds, so you should move the logic that sets your mainStateType dynamically into the top of the Awake function. I suggest putting it in its own function for ease of use in both editor and build cases. And thank you to all those who have pointed it out.
@supendi426 ай бұрын
Is it expensive to call new for every state transition?
@SMHillDev6 ай бұрын
I haven't run it through a profiler, but I assume it's fine seeing as the class itself is pretty lightweight. Though this system could use some optimization I have tested it with dozens of game objects at a time all running various logic ontop of the statemachines and haven't seen any issues linking to it.
@supendi426 ай бұрын
Thanks for the quick reply, I guess there is a lot of difference when instantiating pure C# class and monobehaviour class
@tobias97906 ай бұрын
You have not nearly enough subscribers for how good ur videos are man
@SMHillDev6 ай бұрын
Thank you!
@michealfalke48817 ай бұрын
Valid critiques hopefully they figure it out and fix it (highly doubt it but a man can dream)
@SMHillDev7 ай бұрын
One can only hope yeah.
@two-six57567 ай бұрын
🐛
@joaogabriellimamoraes40877 ай бұрын
how is GetComponent<Animator> supposed to work inside the MeleeBaseState class if it does not inherit from MonoBehaviour ?
@scrillagorilla452411 ай бұрын
amazing tutorial bro! this is perfect. I learned a lot, and you explained things really well. i wonder what you're up to now? did you get a job in the tech field?
@mohokhachai11 ай бұрын
How old are you
@coffeegarden11 ай бұрын
How beatiful algoritm.. Amazing
@thiagodasilva3022 Жыл бұрын
Good tutorial! Though my GroundEntryState seems to go to the GroundComboState even when i dont hit the button. Any Ideas on why this could happen?EDIT: Nevermind t fixed itself through the Attackwindows...
@warpzone8421 Жыл бұрын
Found a bug. I compiled this using 2022.3.5, and it works fine in the editor, but when I build the game, clicking the mouse doesn't do anything. Which is strange, since you're just using Input.GetMouseButtonDown and there aren't any special extra input packages being used. When I googled it, I found a Unity forum thread with like 30 different solutions that were all use-case specific. Why is something as basic as clicking the mouse so fragile in Unity though?
@HippieMoney Жыл бұрын
Gonna ramp up in subs real quick, keep it up! Great tut!
@minishouts272 Жыл бұрын
Ty for the video 🎉
@SSRBast Жыл бұрын
Great video try tutorial!! Keep up the Good Work!
@herrflantier3739 Жыл бұрын
This will be very helpful for my project. Thanks !
@d3certii941 Жыл бұрын
This tutorial was great but im having problems with getting the attack to work and i have no compiler errors
@scobro Жыл бұрын
how would i do this with the new input system?
@almaaanea Жыл бұрын
Aah this is helping me so much! Thank you! I haven't finished but I can tell this is probably going to work. TYSM! I subbed <3
@peterhe2872 Жыл бұрын
getting nullreference error in build only, any clue how to solve it? seems currentstate and nextstate are missing
@pokefesterJr Жыл бұрын
same bro HELP LOL
@peterhe2872 Жыл бұрын
@@pokefesterJr the onvalidate func doesn't get called in buid, sorry for late reply dude
@pokefesterJr Жыл бұрын
@@peterhe2872 np, thanks for the reply. I found out about the on validate after scrolling through the comments some more
@cowardenemy9495 Жыл бұрын
Nice tutorial, but I would like to give a better approach to making attack hitboxes, a better way to do it is with "OverlapCircleAll", with box colliders you might have some problems with static enemies.
@blasterxt9 Жыл бұрын
Thank you buddy
@krytis3024 Жыл бұрын
Just found out my automata class actually isn't useless 🤯
@CrazyWeridoRH Жыл бұрын
So if I'm understanding this correctly, a finite state machine is just a super teeny teeny version of AI? Like AI sperm?
@MarceloCSC Жыл бұрын
Amazing tutorial. You should keep posting, man! It's been awhile.
@2chi2talk Жыл бұрын
Hey check your dm on IG trying to reach out for a gaming project bro
@macawls Жыл бұрын
Thanks King
@UberAnonymous Жыл бұрын
Great video, excellent pacing and concise but poignant descriptions.
@hanhae99 Жыл бұрын
Bro i Just saw your video the first time and its incredibly awesome Learned Lot + saving time not explaining the core factors of the code is also helpful for the main course of this video thanks keep up the Good Work bro subscribed it
@unityalexdev Жыл бұрын
Looks like a lot work was put into int , it's a shame and didn't get attention
@LucasDevWeb Жыл бұрын
Hi Sean, state machine it doesn't work when i do the build, I can't find the solution.
@LucasDevWeb Жыл бұрын
NullReferenceException: Object reference not set to an instance of an object at ComboCharacterState.Update () [0x0001c] in <a5d2a2de270741a18a78ae8a5a602441>:0
@peterhe2872 Жыл бұрын
@@LucasDevWeb did u solve the issue?
@jagerbi_97415 ай бұрын
@@LucasDevWebit seems like that you haven't assigned something
@duyvo1258 Жыл бұрын
Thanks a lot dude! This is heavily underrated tutorial, you taught the fundamental which is easy to understand, I will follow and implement it in my project but with different hitbox managing approach. Anyway, one sub and nice day!
@frankypappa Жыл бұрын
Nice work. Subbed! 👍🏾👌🏾
@lordmango6060 Жыл бұрын
Dang dude, you're very good at explaining things. Even as someone who is new to Unity, I was able to follow along with you
@ItsAkile Жыл бұрын
Thanks, Gonna sink my teeth into this for the first time this week. I already have a base idea of what I want to accomplish
@georgigeorgiev9966 Жыл бұрын
I don't know what i am doing wrong but my character only repeats the first attack animation without clicking or doing anything?
@BlortNet Жыл бұрын
Such good content. Thanks for inspiring me a bit more
Пікірлер
The combat system doesn't work after I built my project. The player character doesn't respond after the attack input. But it works fine in the Unity Editor. Any ideas why?
Yea it happend time to time to me also U need more updated videos u can try one of two things 1. typing ur own code (The some thing could happend) 2. finding more updated tutorial when unity tutrial get 2years or much older it don't working usally even visual tell u all good (But tip for me check ur unity project be4 u deleting ur code maybe something there is worng)
I NEED to know what Visual Studio theme this is- it looks awesome
Hey, so, i'am having a bit of a problem woth the state machine acttack that you developed, i've literaly copied your script to the coma, but my unity keep givinng me this message " NullReferenceException: Object reference not set to an instance of an object ComboCharacter.Update At cs 22 " , do you now why ?
Not well explain...all my Code getting errors till I decide to delete all of them and Find a Vedio that best suits me 🙄
All i get is Errors
bro is black! smashed that like button
Wow, great channel, you are super professional. I'm a beginner game developer and I just made my first 2D platformer in Unity SuperCiggieBlower, available for download on Google Play and under every video on my YT channel. I would be very grateful if you tell me what you think about it. Keep doing what you're doing and I'm sure you'll be successful on YT soon. Take care😀
What a smart Young man, thanks
fucking legend, this is so well done
My dude this is soooo good! Instant sub!
The G.O.A.T is back !!
First
Is it good practice to create fsms for every child object that adds a gameplay mechanic? Like if you had a weapon you'd probably want to have a state machine attached to the "weapon slot".
I wouldn't necessarily say it's good practice. Although fsms are helpful you also don't want to over Engineer a problem. Although you could use it for that, using it for a weapon slot might not be a good/better solution over a traditional inventory system
In the ComboCharacter file I keep getting errors for meleeStateMachine.CurrentState. It tells me the object reference is not set to an object. If I already instatiated the object meleeStateMachine as a private object how could it not exist? Please help I think Im close because when I comment out the reference to meleeStateMachine I am able to get attack 1 out by clicking.
Did you find a solation
Hey, wanted to make this pinned to first say thanks for all the support on the video! I'm planning on making more content like this and content in general very soon. I would also like to clarify an issue I've seen with builds. I didn't run a test build verifying the system (rookie mistake I know) so you might see these. - The OnValidate function doesn't get called inside of builds, so you should move the logic that sets your mainStateType dynamically into the top of the Awake function. I suggest putting it in its own function for ease of use in both editor and build cases. And thank you to all those who have pointed it out.
Is it expensive to call new for every state transition?
I haven't run it through a profiler, but I assume it's fine seeing as the class itself is pretty lightweight. Though this system could use some optimization I have tested it with dozens of game objects at a time all running various logic ontop of the statemachines and haven't seen any issues linking to it.
Thanks for the quick reply, I guess there is a lot of difference when instantiating pure C# class and monobehaviour class
You have not nearly enough subscribers for how good ur videos are man
Thank you!
Valid critiques hopefully they figure it out and fix it (highly doubt it but a man can dream)
One can only hope yeah.
🐛
how is GetComponent<Animator> supposed to work inside the MeleeBaseState class if it does not inherit from MonoBehaviour ?
amazing tutorial bro! this is perfect. I learned a lot, and you explained things really well. i wonder what you're up to now? did you get a job in the tech field?
How old are you
How beatiful algoritm.. Amazing
Good tutorial! Though my GroundEntryState seems to go to the GroundComboState even when i dont hit the button. Any Ideas on why this could happen?EDIT: Nevermind t fixed itself through the Attackwindows...
Found a bug. I compiled this using 2022.3.5, and it works fine in the editor, but when I build the game, clicking the mouse doesn't do anything. Which is strange, since you're just using Input.GetMouseButtonDown and there aren't any special extra input packages being used. When I googled it, I found a Unity forum thread with like 30 different solutions that were all use-case specific. Why is something as basic as clicking the mouse so fragile in Unity though?
Gonna ramp up in subs real quick, keep it up! Great tut!
Ty for the video 🎉
Great video try tutorial!! Keep up the Good Work!
This will be very helpful for my project. Thanks !
This tutorial was great but im having problems with getting the attack to work and i have no compiler errors
how would i do this with the new input system?
Aah this is helping me so much! Thank you! I haven't finished but I can tell this is probably going to work. TYSM! I subbed <3
getting nullreference error in build only, any clue how to solve it? seems currentstate and nextstate are missing
same bro HELP LOL
@@pokefesterJr the onvalidate func doesn't get called in buid, sorry for late reply dude
@@peterhe2872 np, thanks for the reply. I found out about the on validate after scrolling through the comments some more
Nice tutorial, but I would like to give a better approach to making attack hitboxes, a better way to do it is with "OverlapCircleAll", with box colliders you might have some problems with static enemies.
Thank you buddy
Just found out my automata class actually isn't useless 🤯
So if I'm understanding this correctly, a finite state machine is just a super teeny teeny version of AI? Like AI sperm?
Amazing tutorial. You should keep posting, man! It's been awhile.
Hey check your dm on IG trying to reach out for a gaming project bro
Thanks King
Great video, excellent pacing and concise but poignant descriptions.
Bro i Just saw your video the first time and its incredibly awesome Learned Lot + saving time not explaining the core factors of the code is also helpful for the main course of this video thanks keep up the Good Work bro subscribed it
Looks like a lot work was put into int , it's a shame and didn't get attention
Hi Sean, state machine it doesn't work when i do the build, I can't find the solution.
NullReferenceException: Object reference not set to an instance of an object at ComboCharacterState.Update () [0x0001c] in <a5d2a2de270741a18a78ae8a5a602441>:0
@@LucasDevWeb did u solve the issue?
@@LucasDevWebit seems like that you haven't assigned something
Thanks a lot dude! This is heavily underrated tutorial, you taught the fundamental which is easy to understand, I will follow and implement it in my project but with different hitbox managing approach. Anyway, one sub and nice day!
Nice work. Subbed! 👍🏾👌🏾
Dang dude, you're very good at explaining things. Even as someone who is new to Unity, I was able to follow along with you
Thanks, Gonna sink my teeth into this for the first time this week. I already have a base idea of what I want to accomplish
I don't know what i am doing wrong but my character only repeats the first attack animation without clicking or doing anything?
Such good content. Thanks for inspiring me a bit more