Melee Combat & Weapon System - Unity Beginner Tutorial

  Рет қаралды 85,567

Zyger

Zyger

Күн бұрын

Пікірлер: 183
@unity
@unity 2 жыл бұрын
Amazing content Zyger, really comphrehensive and clear. We love to see it ❤!
@koofe0
@koofe0 2 жыл бұрын
lol its actual unity
@RedHeadphones
@RedHeadphones 2 жыл бұрын
omg real unity
@mirorr5698
@mirorr5698 2 жыл бұрын
nice ad
@mismatchingshoes5249
@mismatchingshoes5249 2 жыл бұрын
Ya love to see it
@ethandominic8070
@ethandominic8070 2 жыл бұрын
You guys are awesome I haven’t seen anyone support their creators like this
@cfundeniable3442
@cfundeniable3442 Жыл бұрын
I’ve been a fitness coach for 15 years. I know nothing about game development, and I’m starting to learn. Although I’m new to game dev, I am quite experienced at teaching. You are very good teacher! Subscribed!
@Ytsssss364
@Ytsssss364 Жыл бұрын
overall, good AttackCoolDwon... ok well - but the wp vs. wc oversight *egads* - beginner's are having enough trouble as it is - also, showing making the "Attack" trigger in the Animator Controller instead of having it prepopulated like was done later for "Hit" trigger demonstration - would have been better teaching practice. But hey. Only a teacher like me would maybe nitpick on things like this
@justinbennett9998
@justinbennett9998 2 жыл бұрын
I found an open sourcish project thats aiming to create a custom launcher for everquest trilogy and its being ported over to unity. I REALLY appreciate the unity videos ive found because i habe NO idea ehat im doing yet and your tutorials are extremely helpful. Youve become a huge part of a dream thats coming true. Thank you.
@jojam.o
@jojam.o 11 ай бұрын
probably the best unity tutorial for fps melee combat ive come across, thank you.
@xenvo274
@xenvo274 Жыл бұрын
OH MY GOD I WANTED TO DELETE MY WHOLE GAME BC I COULDNT GET THE ANIMATIONS TO WORK I HAVE BEEN LOOKING FOR A SOLUTION FOR TWO WEEKS YOU'RE THE BEST
@W0B0N
@W0B0N 2 жыл бұрын
I have never done any coding but i feel like i learned something from this. Great video.
@ahmadgamal65
@ahmadgamal65 2 жыл бұрын
You are missing out bro you never wrote any code??
@Cat_6921
@Cat_6921 Жыл бұрын
omg
@mattiusstrutton
@mattiusstrutton 2 жыл бұрын
This was a great tutorial! For anyone confused with coroutines I encourage you to look into it. But, if you still can't wrap your head around it just yet don't get frustrated. You can also use the animator to turn on and off the weapons collider as a hack-y solution. Thank you, Zyger for making the video. I never would have thought of making the weapon hit box bigger to hit the enemies and would have spent a lot of time wondering why it wasn't working haha.
@TheJuggernaut.
@TheJuggernaut. 2 жыл бұрын
Every time I press the attack button, it does not work, what do I do? Is there a way to change the attack button to the space button?
@jackslammer
@jackslammer Жыл бұрын
Will be using the lessons here to integrate into my own game, thank you so much for posting this.
@jamesclements9448
@jamesclements9448 2 жыл бұрын
You did a great job with this tutorial. You are going to have a great career in game dev ahead of you.
@DaRealViso
@DaRealViso Жыл бұрын
For people who have the problem of it not always registering the hit, the problem is that the collider is always active so therefor is always touching the enemy. To fix this first make a public gameobject for your hitbox and then have a HitBox.SetActive(true); for when you attack and a HitBox.SetActive(false); on your reset cooldown
@Garb0_
@Garb0_ Жыл бұрын
How, pls help
@trentonbeeson7132
@trentonbeeson7132 Жыл бұрын
I cannot tell you how valuable this comment is
@DaRealViso
@DaRealViso Жыл бұрын
@trentonbeeson7132 Thanks. Happy that my brief knowledge of coding helped
@baulbasauur7659
@baulbasauur7659 10 ай бұрын
exactly what i was looking for
@arachnid5669
@arachnid5669 2 жыл бұрын
Really well explained and easy to follow, thanks for making!
@phonix374
@phonix374 2 жыл бұрын
Thank you zyger realy cool tutorial you saved my life
@nathanielgmoyon4772
@nathanielgmoyon4772 3 ай бұрын
Thank you for this amazing tutorial
@kimikazio
@kimikazio 2 жыл бұрын
fantastic, it helped me a lot to understand animation in unity. Thanks for making this video! ;)
@thesilentwisp
@thesilentwisp 2 жыл бұрын
Thank you so much I'm just starting out and this is super helpful.
@mismatchingshoes5249
@mismatchingshoes5249 2 жыл бұрын
You know you’ve peeked when unity sponsors you
@vrutantshah8266
@vrutantshah8266 Жыл бұрын
Thank you soo much! Finally got the animations working!
@toongenie
@toongenie 2 жыл бұрын
love this system, very easy to understand and works great! thanks for sharing
@ZygerGFX
@ZygerGFX 2 жыл бұрын
thanks I appreciate it !
@ArtisticallyGinger
@ArtisticallyGinger 2 жыл бұрын
I see you started looking into Coroutines to make your life easier. They make your processes waaaaay easier :D
@rothhomemade
@rothhomemade 7 ай бұрын
I will give you credit on my game's demo! thnk sooo much
@MorphingGrid101
@MorphingGrid101 2 жыл бұрын
Thank you so much Zyger! Very cool! 👍
@LukaRBJJ
@LukaRBJJ 2 жыл бұрын
Awesome video, neatly explained!
@CatsandPolygons
@CatsandPolygons 2 жыл бұрын
Thanks a lot this really helped me!
@lucaslessa318
@lucaslessa318 Жыл бұрын
Thank you very much! You are a hero!
@ChildishSoap
@ChildishSoap 2 жыл бұрын
Thank U Soo Much I needed this for my first Game the only part im stuck in is in the animations ahah
@johnathaninmanjr2629
@johnathaninmanjr2629 2 жыл бұрын
Great vid, crystal clear and easy to follow , tyvm!
@rogersun6184
@rogersun6184 Жыл бұрын
Thank you very much :)
@purjolokgaming8482
@purjolokgaming8482 Жыл бұрын
I have a slight problem, when my weapons box collider already collides with the enemys before i attack, nothing happens when i acctually do attack. I might have done something wrong. It works normally when the weapon box collied does not collide with the enemy before.
@roscoeroly
@roscoeroly 4 ай бұрын
Awesome video Gabi. "Cooldwon" caused my OCD to flare up and I almost got an aneurism, but apart from that 10/10.
@alphakelo
@alphakelo 2 жыл бұрын
This was a really good tutorial and I learned a lot, is there any sort of health and damage system that you know of that would work along side this tutorial?
@justinbennett9998
@justinbennett9998 2 жыл бұрын
Good question.
@Ytsssss364
@Ytsssss364 Жыл бұрын
yeah - see my post above on similar question - but I'll answer here too. You need of course to have a Enemy Health Controller - a script that controls the Enemy's Health status. you attach it to your Enemy Controller. In that Enemy Health Controller script, you create a public function called DamageEnemy(float damageAmount) which defines how the Enemy takes damage. Usually it's something like: {currentHealth = currentHealth - DamageEnemy} -- sorry but youtube does not like "minus equals" using symbols you know what I mean - so then, in the Weapon Controller, when the HIT is being done, in the part where you're playing that animation controller - where the SetTrigger ("Hit") is happening - well, you actually made a hit - the enemy flinches with its "Hit" animation and "bleeds" a "Blood particle" that's instantiated. That's where you wanna then take off some Enemy|Health - so here you code something like other.gameObject.GetComponent().DamageEnemy(damage); where "damage" is defined as a float in the WeaponController script - good luck
@MaskedYemeni1
@MaskedYemeni1 7 ай бұрын
How to get Code pls i am big fan :(
@cosmocourtois3345
@cosmocourtois3345 2 жыл бұрын
I'm probably not the first to say this, but it is so nice to hear a girl talk for once in a male-dominated platform, especially in the game development community. Thanks!
@chrismations9191
@chrismations9191 2 жыл бұрын
K ima watch this after school for my game!
@schmutzxD
@schmutzxD 2 жыл бұрын
Really well explained, thanks for that! I tried using your method with a third person controller, and I actually got it done working quite well. I'm struggling to get a decent attack combo system done though. I tried to make a transition between the first hit animation and the first combo hit animation just like you did with the first one, using the previous attack trigger as a trigger for the second transition, but I can't seem to get it done. You would have to click LMB in just the right moment to get the transition done and sometimes for some reason the animation gets stuck and won't transition to an other animation for a very short moment(
@dot5527
@dot5527 2 жыл бұрын
i have the exact same issue
@canalataquerapido
@canalataquerapido 2 жыл бұрын
i like your channel thanks!
@aaronludwig8150
@aaronludwig8150 2 жыл бұрын
Phenomenal.
@GunzzYT
@GunzzYT 2 жыл бұрын
ok, so i had this problem where my sword would swing but it was stuck in the attack animation(it wouldnt go back to idle animation). I had to click twice on my mouse btn in order to go back to idle and then i could attack again, so my solution was: Put the Anim.SetTrigger("Attack"); also in the ResetAttackCoolDown() method. That fixed it for me.
@back2jump
@back2jump 23 күн бұрын
Hey I'm pretty new to coding and making games but your tutorials are perfect do you think I could combine this and the steam netcode tutorials for pvp?
@pollisgaming3168
@pollisgaming3168 2 жыл бұрын
Hi, everything worked perfectly but I was just wondering if it is necesary for the object's colliders to be on trigger since when I have them on trigger I can just walk through them. Ty for reading
@benjismith2848
@benjismith2848 8 ай бұрын
Love the tutorial! Not sure if anyone else has run into this problem too but the Hit animation where the enemy gets knocked back after being hit, sometimes plays twice? tried a few different things but can't figure out whats causing it? I basically done the scripts just as the ones in this video.
@fogcomign
@fogcomign Жыл бұрын
Thank you!
@captaingames2037
@captaingames2037 9 ай бұрын
really helpful
@VkStudio_
@VkStudio_ Жыл бұрын
Hey great video but i wanted to make it so that when i attack that the camera shakes a little idk how to do that i could really use your help.
@ZygerGFX
@ZygerGFX Жыл бұрын
just make a camera shake script and call the shake function when you press your attack button. Brackeys has a great video on camera shake: kzbin.info/www/bejne/b3Kcqp1ugNOAbsU
@blackespectral
@blackespectral Жыл бұрын
thank you so much
@Driesipops
@Driesipops 2 жыл бұрын
I spent the better part of 9 hours trying to figure out why the animation part wasn't working... editing code, placing debugs, looking for boolean code that would work, trying to put the script onto different assets to see if that would work... only to realize that I had accidentally made a bool instead of a trigger. Don't be a fool, don't be like good ol' Dries over here, make sure to check that your triggers are actually triggers before wasting 9 hours of your life.
@ZygerGFX
@ZygerGFX 2 жыл бұрын
Ah that sucks. I'm pretty sure I've done that before too... 😅 at least now you know
@fragdummy
@fragdummy Жыл бұрын
you just saved me
@sleepyaj
@sleepyaj 2 жыл бұрын
Hi uhm im hoping you'll respond to this, the tutorial is really helpful so far but one tiny problem that i've been stuck on is, when i'm preparing to use the animator. No matter how many times I drag the animation into the animator- nothing seems to pop up? Did I do something wrong? I've tried clicking to select the Sword-Attack/Sword-Idle then dragging it, dragging it without selecting it and nothing.
@ZygerGFX
@ZygerGFX 2 жыл бұрын
This is actually a unity bug and had been for a while. I reccomend resetting unity and reopening the project. Worst case scenario you might need to re install it. But before that make sure yoy actually have the object with the animator component selected.
@sleepyaj
@sleepyaj 2 жыл бұрын
@@ZygerGFX Thank you so much! I did what you said and made an entirely new project and repeated the same steps in the video and it works! Thank you so much for responding! ;D
@farasapt6579
@farasapt6579 Жыл бұрын
great tutorial. but at the end the coding doesn't work for me as the last minute. So at 19:01, when I type wc.IsAttacking) , an error called ' Assets\Scripts\CollisionDetection.cs(12,39): error CS1061: 'WeaponController' does not contain a definition for 'IsAttacking' and no accessible extension method 'IsAttacking' accepting a first argument of type 'WeaponController' could be found (are you missing a using directive or an assembly reference?) great tutorial but I hate coding :(
@ZygerGFX
@ZygerGFX Жыл бұрын
do you have a variable under the name "IsAttacking" ? is that how its spelt ? is it accessible ? That error basically says that this variable is either not accessible or doesn't exists ( which is usually due to spelling or the protection level of the variable)
@dcry1003
@dcry1003 2 жыл бұрын
hey zyger question, can i use this code combined with the code for pick up and throwing gameobjects (melee weapons)? *i dont really have a code for a pick up and throw gameObjects i just had a thought for picking up weapons and being able to use them (like you did here) and also being able to throw them for long range dmg option*
@AleksandarDaGr8
@AleksandarDaGr8 Жыл бұрын
Great tutorial! Only thing I'm a little confused on is how to have the enemy lose HP. was think it would make more sense to have the collision be handled by an enemy controller script and access a variable from the weapon called damage then if the OnTriggerEnter for if the enemy touches the swords hitbox to subtract the damage from health
@Ytsssss364
@Ytsssss364 Жыл бұрын
naw, you're gonna have to create in your Enemy Health Controller a function where it takes the damage. Say, DamageEnemy. Then in the WeaponController, you're going to GetComponent
@Ytsssss364
@Ytsssss364 Жыл бұрын
SORRY i used minus equals for code and it did it above as a "strikethrough" currenHealth minus equals damageAmount etc above, not strikethru lol
@majesticchicken3213
@majesticchicken3213 Жыл бұрын
this is really2 good
@Franos_official_
@Franos_official_ Жыл бұрын
Can someone copy the script here becose it didn't work
@malcolmgruber8165
@malcolmgruber8165 2 жыл бұрын
This is a great tutorial, but I was laughing for part of it because the players capsule looks like a turd. xD
@jojikYT
@jojikYT 2 жыл бұрын
Aren't animation events better then coroutines in this case? Much easier to control and no timing problems.
@ZygerGFX
@ZygerGFX 2 жыл бұрын
yes they are i didnt bother showing those since this is more of a tutorial on getting the basic weapon mechanics. but you're totally right
@Omnivoid22
@Omnivoid22 Жыл бұрын
Now i gotta look up animation events? If i want something to end when animation ends. thats what i need to use?
@Ytsssss364
@Ytsssss364 Жыл бұрын
@17:13 you use "wp" for the "WeaponController" - I miss the part where you change it at random to "wc" - what gives??? like at 18:47, it's "wc" - did you make this tutorial while sitting in the WC?
@JaketheMotorhead
@JaketheMotorhead 2 жыл бұрын
I keep getting this error: InvalidOperationException: You are trying to read Input using the UnityEngine.Input class, but you have switched active Input handling to Input System package in Player Settings. Weapon_controller.Update () (at Assets/Weapon_controller.cs:13) Can you help?
@ZygerGFX
@ZygerGFX 2 жыл бұрын
you are using the new input system. so you need to either change to the old one. or change the way your checking for input.
@JaketheMotorhead
@JaketheMotorhead 2 жыл бұрын
@@ZygerGFX How do you change the way. I tried changing to the old one and there were compile errors in the movement.
@JaketheMotorhead
@JaketheMotorhead 2 жыл бұрын
@@ZygerGFX how do you change the way your checking for input?
@DetectiveRyku
@DetectiveRyku 2 жыл бұрын
Thank you
@erincristall
@erincristall Жыл бұрын
I got up to the point where I have an attack animation and an enemy that goes into the idle animation, but when I actually attack the enemy, it doesn't do anything like the colliders aren't detecting. I am very confused because I pretty much just copy/pasted everything you did.
@kingofroms7224
@kingofroms7224 2 жыл бұрын
thansk for it
@Darkziss0
@Darkziss0 2 жыл бұрын
Thank!
@scubaking4690
@scubaking4690 2 жыл бұрын
Nice video it really helped me out, but I have a question. I tried making a second attack, made a trigger for it, and just copied and pasted your code, but changed the trigger name and the input button, swordattack, and canattack. After I did it, everything seemed to work, but when I pressed the button for the second attack, it worked, but kept repeating with no way to turn it off. Could you please tell me what I messed up?
@ZygerGFX
@ZygerGFX 2 жыл бұрын
kind of hard to tell but make sure your animation is not on loop. if you find the animation you can see if its turned to loop or not!
@scubaking4690
@scubaking4690 2 жыл бұрын
Sorry how do I do that?
@ZygerGFX
@ZygerGFX 2 жыл бұрын
@@scubaking4690 well in the video I make an animation and I turn of loop. but you can go on the animation and turn it off
@scubaking4690
@scubaking4690 2 жыл бұрын
@@ZygerGFX Thank you so much it finally fixed itself. for some reason after I do the animation I have to click the button again to do other animations but that's fine. Thanks again so much!
@aimanrazia3236
@aimanrazia3236 5 ай бұрын
Can we apply this same to third person view
@levivalgaerts6813
@levivalgaerts6813 Ай бұрын
Can someone pleas help i made a mistake with the code but can't vind it.
@jmiahbullfrog
@jmiahbullfrog Жыл бұрын
Mine doesnt show the sword, can attack and attack cool down on weapon holder
@deni5368
@deni5368 10 ай бұрын
it stays in the position that i finished the animation so when i click to attack it reverses from left to right. I made the animation go from right to left. can somone pls help?
@alsowow
@alsowow Жыл бұрын
I have a problem, i have an enemy that can move and look around, but hen i give it animations it can't move or look around. any tips to prevent this?
@ZygerGFX
@ZygerGFX Жыл бұрын
make sure your animations don't alter the position of the object. That will prevent it from moving. So just remove the position changes in the animation :)
@fox.9879
@fox.9879 2 жыл бұрын
i have these three issues can anyone help with this error CS0119: 'Component.GetComponent()' is a method, which is not valid in the given context Assets\collisionDetection.cs(13,31): error CS0103: The name 'wc' does not exist in the current context Assets\WeaaponController.cs(34,18): error CS0428: Cannot convert method group 'GetComponent' to non-delegate type 'AudioSource'. Did you intend to invoke the method?
@GameBoy-ur9mb
@GameBoy-ur9mb 2 жыл бұрын
SECOND BRACKEYS PLAS!
@brownie4672
@brownie4672 2 жыл бұрын
hey you might not see this, but i am getting this error where it says "wc does not exist in this context." please help
@DayDreamSounds
@DayDreamSounds Жыл бұрын
very late here. When I attack the first time, canAttack doesn't become true again. It just stays unticked. I double checked code but can't find anything :(
@DayDreamSounds
@DayDreamSounds Жыл бұрын
Nevermind. Obviously didn't check code properly. I didn't even start the coroutine haha!
@NotDoubleA
@NotDoubleA 2 жыл бұрын
This was such a good tutorial and i really thought i was able to pull it off, lol nope got error CS1061. i'll still like the video though.
@ZygerGFX
@ZygerGFX 2 жыл бұрын
what is the error ?
@NotDoubleA
@NotDoubleA 2 жыл бұрын
@@ZygerGFX This is the error code i got. "Assets\WeaponContoller.cs(26,31): error CS1061: 'GameObject' does not contain a definition for 'GetComponet' and no accessible extension method 'GetComponet' accepting a first argument of type 'GameObject' could be found (are you missing a using directive or an assembly reference?)
@ZygerGFX
@ZygerGFX 2 жыл бұрын
@@NotDoubleA you spelt it wrong .. its meant to be GetComponent not GetComponet
@NotDoubleA
@NotDoubleA 2 жыл бұрын
@@ZygerGFX oof, i didn't even notice it. thanks for that quick reply
@GMRV533
@GMRV533 Жыл бұрын
at 5:25 i did the same things as u did but my sword just keeps swinging
@ZygerGFX
@ZygerGFX Жыл бұрын
is your animation set to loop ? if so disable that checkbox
@tronstein6342
@tronstein6342 2 жыл бұрын
thank's a lot:;;;
@234zuscoutjango9
@234zuscoutjango9 2 жыл бұрын
if i put Debug.log(other.name) in the part whereit is checked with with tag the sword collides i only get the name of my first person controller and i have no idea why
@Skeltcher
@Skeltcher 2 жыл бұрын
Im getting this error after finishing the WeaponController script. "InvalidOperationException: You are trying to read Input using the UnityEngine.Input class, but you have switched active Input handling to Input System package in Player Settings."
@ZygerGFX
@ZygerGFX 2 жыл бұрын
your trying to detect input using the old input system methods while your using the new one. Either change the way your checking for input or revert back to the old input system.
@BobTheGreatGoober
@BobTheGreatGoober 9 ай бұрын
I Cant Drag In Da Anims And Make A New Trigger :( (i found out that i didnt select the sword and when i did and then looked in the animations they were there no worries)
@syafiqaffandi4427
@syafiqaffandi4427 Жыл бұрын
Hi @zyger, i need some help and im hoping you see this as it is my final year project, i would like to know how i can make my AI enemy to not be able to walk through the player or the trees bcs when i activated the isTrigger, he seems to be able to pass through everything
@ZygerGFX
@ZygerGFX Жыл бұрын
you can have 2 colliders on it. One which is OnTrigger and the other that isn't. You could also write a script that checks the distance between the enemy itself and the player and makes it stop moving when it reaches a certain distance value. Best of luck
@alsowow
@alsowow Жыл бұрын
How would i have the enemy lose health? I thught that you would go over it but apparently not
@ZygerGFX
@ZygerGFX Жыл бұрын
when you detect the enemy getting hit just decrease their health like health-=10;
@alsowow
@alsowow Жыл бұрын
@@ZygerGFX I'm relatively new to coding so if you could elaborate that would be great
@ZygerGFX
@ZygerGFX Жыл бұрын
@@alsowow well in your code you detect the enemy getting hit so if you followed the video that would be in the enemy script under OnTriggerEnter decrease the enemies health like: health -= amount; Health, is just a variable that you can set to whatever number you want and amount is either a variable or could just be a number of how much you want to decrease the health by.
@SenpaiMasterGD
@SenpaiMasterGD Жыл бұрын
i cant get the ¨hit ¨ to show do you know why @Zyger
@oggy4019
@oggy4019 2 жыл бұрын
how to do auto swing every 1 sec when holding mouse0? thanks in advance!
@IrfuTuber
@IrfuTuber Жыл бұрын
Input.GetMouseButton instead of Input.GetMouseButtonDown will work
@Creep-_eye
@Creep-_eye 9 ай бұрын
its hard zyger i cant do it
@wowgames3035
@wowgames3035 2 жыл бұрын
nice
@supernick7773
@supernick7773 2 жыл бұрын
Hi, i recently started coding in unity and I have copied everything from the video, until 10:26, but when I press the button, nothing happens. Do you have any fixes?
@ZygerGFX
@ZygerGFX 2 жыл бұрын
Debug your code. Chekc whether functions get called. Whether the input actually gets called and is working. From what you said I cant tell what's wrong but just debug your code and check if things get called
@supernick7773
@supernick7773 2 жыл бұрын
@@ZygerGFX how do I debug the code
@ZygerGFX
@ZygerGFX 2 жыл бұрын
@@supernick7773 I recommend researching how to do that. but you should use debug.log to send messages. you can write this in functions and you will receive a message in the console. which will tell you that the function gets called. if you don't see it, then it means it doesn't get called. which means something is causing the function not being called. you can always join the discord server and ask people in the help channel for help ! :))
@TheJuggernaut.
@TheJuggernaut. 2 жыл бұрын
Every time I press the attack button, it does not work, what do I do? Is there a way to change the attack button to the space button?
@quinnncy4703
@quinnncy4703 2 жыл бұрын
yeah, change the input from left clikc to spacebar
@TheJuggernaut.
@TheJuggernaut. 2 жыл бұрын
@@quinnncy4703 Could you elaborate?
@quinnncy4703
@quinnncy4703 2 жыл бұрын
@@TheJuggernaut. on the part that is like GetInput(mousebutton) change it to spacebar
@TheJuggernaut.
@TheJuggernaut. 2 жыл бұрын
@Quinnncy You wouldn’t mind elaborating further, would you? Like instead of which line, should I add a correct one?
@alphakelo
@alphakelo 2 жыл бұрын
Hi, Im pretty new to unity, but I have copied down your script (up till 10:39) and everything seems correct but when I click nothing happens? Can someone please help?
@ZygerGFX
@ZygerGFX 2 жыл бұрын
use debug.log to check if the function is being called. if it is then maybe something with the animations. and if not you probs not calling the function or input isnt being detected
@alphakelo
@alphakelo 2 жыл бұрын
@@ZygerGFX Oh my god, thank you so much
@dezhofman3958
@dezhofman3958 2 жыл бұрын
Does anyone know why my mouse button isn’t working i set it to input.Getmousebutton(0) but it isn’t doing anything in my game
@ZygerGFX
@ZygerGFX 2 жыл бұрын
Make sure to use the old input system. And ensure there are no errors. It should be Input.GetMouseButtonDown(0)
@dezhofman3958
@dezhofman3958 2 жыл бұрын
@@ZygerGFX yeah i forgot to type down in my comment 😅 but what do yeah mean by making sure to use the old input system
@ZygerGFX
@ZygerGFX 2 жыл бұрын
@@dezhofman3958 well unity has 2 systems the old classic one and the new one so just double check which one your using I project settings. Also debug your code see if the function gets called and if the input is actually detected.
@sdvilhidfhvs
@sdvilhidfhvs 2 жыл бұрын
what abt the fps game?? is it canceled?
@nytro6049
@nytro6049 2 жыл бұрын
hi Zyger I have a question when I have three animations and I would like them to always be use one of them randomly how can i do it. thank you for the answer.
@jayengel9012
@jayengel9012 2 жыл бұрын
A very simple way is creating a trigger for each attack animation (attack1,attack2 etc..) and then you you make a list or an array in your scripts that contains a string for each trigger : ["attack1","attack2" etc..], now you just have to do like in the video, but instead of using just : settrigger("attack"), you will do something like this : settrigger(attackList[random.randint(0,attackList.Length-1)]), this could also be brought further with using an animation int id state machine where you can easily switch randomly animation id and then aply a global trigger to the trigger which isn't too hard, tell me if you need more help
@prrithwirajbarman8389
@prrithwirajbarman8389 2 жыл бұрын
Found ya
@monkeefox5997
@monkeefox5997 2 жыл бұрын
cool
@kokorodev1219
@kokorodev1219 2 жыл бұрын
i need 3rd person
@SmashBros4339
@SmashBros4339 2 жыл бұрын
6:53: When I attack, the blue bar at the bottom of my sword attack doesn't go away it just stays there, and when i click again, it goes back to normal but when i attack, the blue bar still is there and i have to keep clicking again. ANY FIX?
@ZygerGFX
@ZygerGFX 2 жыл бұрын
you probably set up your animations wrong. if it doesn't continue to the next animation its because there is something wrong with your transition back. ensure there's nothing on that transition that's stopping it from going back. alternatively redo the animations. Not really sure since I cant see it.
@SmashBros4339
@SmashBros4339 2 жыл бұрын
@@ZygerGFX nvm I didn’t need the attack trigger for the transaction from attack to idle
@stopmotionnoob5053
@stopmotionnoob5053 9 ай бұрын
Somone how i have 26 errors
@DwuhTypufGranie
@DwuhTypufGranie 2 жыл бұрын
11:17
@bisutowastaken
@bisutowastaken 2 жыл бұрын
14:00
@MugiwaraLevi560
@MugiwaraLevi560 2 жыл бұрын
im the first like lets go
@MiloTheDuck-s7j
@MiloTheDuck-s7j 2 жыл бұрын
No you're 2nd
@startandplay6706
@startandplay6706 2 жыл бұрын
hey friend can you make this video in a new way for 2021..., kzbin.info/www/bejne/l5vdeZ6PpNxgqdE&ab_channel=DonHaulGameDev-Wabble-UnityTutorials
@bisutowastaken
@bisutowastaken 2 жыл бұрын
6:13
@alphakelo
@alphakelo 2 жыл бұрын
How could I use this to kill an enemy?
@ZygerGFX
@ZygerGFX 2 жыл бұрын
well in the video I showed how enemies can detect an attack from the player. in my case I make them play an animation and spawn some particles. but if you want to deal damage do that there. and what you do will depend what sort of health system you have implemented.
@alphakelo
@alphakelo 2 жыл бұрын
@@ZygerGFX Ok, Thank You.
@alphakelo
@alphakelo 2 жыл бұрын
@@ZygerGFX Sorry, one last question what particle did you use?
@ZygerGFX
@ZygerGFX 2 жыл бұрын
@@alphakelo dont apologise xD. what do you mean by what particle ? its one I made myself
@alphakelo
@alphakelo 2 жыл бұрын
@@ZygerGFX ohhh ok, (I'm new too unity and Coding thought that particles were a prebuilt thing lol)
@Al3bassy
@Al3bassy 2 жыл бұрын
wowo 10 seconds ago
@QuadDamage3
@QuadDamage3 2 жыл бұрын
Nice tutorial, but are you **in hurry** to somewhere? Clicking so quickly through scripts felt nearly criminal.
How I Became a Sea of Thieves Developer
8:05
Zyger
Рет қаралды 273 М.
Modular Combo System for Combat in Unity
20:29
The Game Dev Cave
Рет қаралды 36 М.
Walking on LEGO Be Like... #shorts #mingweirocks
00:41
mingweirocks
Рет қаралды 6 МЛН
Osman Kalyoncu Sonu Üzücü Saddest Videos Dream Engine 275 #shorts
00:29
amazing#devil #lilith #funny #shorts
00:15
Devil Lilith
Рет қаралды 18 МЛН
У вас там какие таланты ?😂
00:19
Карина Хафизова
Рет қаралды 24 МЛН
I Locked this AI Dog in an Escape Chamber for 1000 Years
21:29
Making a Game with Your HORRIBLE Ideas
9:32
Zyger
Рет қаралды 8 М.
Recreating Batman Arkham's Freeflow Combat | Mix and Jam
7:35
Mix and Jam
Рет қаралды 122 М.
I Made A Difficult Game About Climbing
15:04
Pontypants
Рет қаралды 2,1 МЛН
10 Minutes vs. 10 Years of Animation
19:29
Isto Inc.
Рет қаралды 1,2 МЛН
Optimizing my Game so it Runs on a Potato
19:02
Blargis
Рет қаралды 649 М.
I Built a Robot that Plays FPS Games
21:23
Basically Homeless
Рет қаралды 885 М.
AI Boxing Got me Wheezing
15:06
cozmouz
Рет қаралды 414 М.
I Made the Same Game in 8 Engines
12:34
Emeral
Рет қаралды 4,2 МЛН
I Made a Physics Engine in Scratch
8:03
Zyger
Рет қаралды 18 М.
Walking on LEGO Be Like... #shorts #mingweirocks
00:41
mingweirocks
Рет қаралды 6 МЛН