How to equip and animate weapons in 2D - Godot (the EASY way)
Вставка
- Опубліковано 16 вер 2024
- Hey y'all! This Godot tutorial shows how to equip/attach items to your players hand and also animate them accordingly.
Character Customization Video:
• Godot - 2D Character C...
Miner's Delight Devlog:
• Miner's Delight - Solo...
Follow me on:
/ arkevegames
arkeve.itch.io/
Music:
/ lakeyinspired
This tutorial really helped me learn a lot of essential ideas/concepts for gamedev, thanks!
Very very underrated stuff, seeing both sides of drawing and code was perfect! Thanks
Very nice ! I was searching a way to create an animation for my character with a weapon for my game :) That's not with Godot but the way you do it inspired me, thank you !
Just found this video on the subreddit. Great stuff, you've got yourself a new sub! Looking forward to more quality tuts and logs. :)
Thank you!! Appreciate the support! Hope you will enjoy the coming tutorials and devlogs! :)
this actualy helped me a lot, thanks for that! btw your videos are so well edited, good work man :) +1 subscriber
Thank you! That means a lot :)
Bruv , i was looking something like this yesterday and now you posted this . ty i was going to do attack animation for player ( not seperated but actual animation for only 1 sword ) , you saved me :D
please keep posting this type of player based stuff like Stats if possible
Glad to hear it! Yeah i will definitely plan on making those types of tutorials down the line! Stay tuned!
@@Arkeve yeah i YOINKED your method too :D thank you!
This was a MAJOR help! I truly appreciate this!!
Dude thanks you teach well and I hope your channel goes far.
I appreciate that!
This is pure gold! TYSM!
Perfect Tutorial
Awesome godot tutorial videos! Your game looks sweet too! Subscribed!
I love watching these old Godot videos after trying to teach myself G4. Im transposing the code as best i can in my head LMFAO
Brilliant idea!
Btw do you really need to make Idle for each side? Couldn't you just use the flip_h = true?
Great tutorial!
Thank you!!
thanks JUST THANKS you helped me so much!
Very helpful! Thank you :D
Nice but who holds a sword like that 😂
I'll be making some funky characters hopefully soon. I've been busy going all over Beijing on gold hunting trips. *sadly..NO gold was ever found..not even a speck/flake* So it's back to toying with sprites and godot!
What if your item is in your innovatory and you want to click equip like there no bar it’s all in a inventory
Gold!
Your character kinda has a weird way of holding weapons. Imo it would be much more intuitive that he held the sword at a 90 degree angle form his body when his arms are hanging straight down.
@Maddux Amos why would you need to do that...
thank you so much 😆😆😆
very helpfull work!
So then what do you do when you wanna flip the character around?
Edit I figured it out, just gotta switch the x scale to its negative for the parent node so that they all change to their opposite positions.
Did you code it in the script or did you make an animation for each side?
@@GregoryHouse92 I did it with a script but I imagine it'd be fine to do it through animations. Probably a bit less work with a script though since you don't have to make a flipped version of each animation.
@@bat-stranger3067 Do you mind telling me how? Was it just flip_h = true or was there more work involved?
Thanks.
Welcome!
Awesome and helpful video! You’ve gained a sub from me, that’s for sure.
Do you think you could go into more detail on how to attach and animate the weapon sprite to the players attack animation? For example, if the player is facing left and attacks, how could you have the weapon animate along with the player, and then after that, return back to its idle state?
Hopefully you understand what I mean by that. A tutorial on that would be really helpful.
Ok, so how do you switch between hair, clothes, shoes, etc. inside of the animation? Not sure if I'm missing something but I've been having trouble doing this, even after watching the first video. I'm trying to make equipable armor sets, also this channel deserves way more than 3K subs, so I subbed myself.
cool ...i need this
Im glad!
Hello! Thank you!
How are you moving the sprites (clothes) with the body?
Sorry, must of missed this comment. I have a spritesheet for each clothing part, and I stitch them together in Godot. This video: ua-cam.com/video/AkKywZDJNeE/v-deo.html goes more into detail.
excellent tutorial, i just wanted to know if i can (by script or animation) change the Z order of the sprites
This was really helpful and good guide, but Ive been trying to figure out for couple nights how can i flip the weapon sprite? player flips but for weapon i just dont get it
My question is why did we make a new player scene when we already had one?
Waiting for the next serie
Is this system achievable in Unity? I'm having the same challenge where I don't want to draw one weapon X times for Y frames.
for a game that would have a lot of different swords, pickaxes, items, etc. would preloading become a performance problem when preloading all the sprites??
But if my Input Key depends on the slot of my hotbar that the item is, how I supposed to do?
I have a question about scene transition. The world_scene doesnt work..yet when i put say *world2.tscn* it goes to only the next world.
Im not sure i understand, could you clarify a bit more?
@@Arkeve I figured out why. LOL I didn't connect the world_scene from each lvl. Works now. *i had to watch the tutorial very carefully* Now it transitions lvl connects.
What is this called so I can search up a tutorial for unity?
if this isnt working try something like this
onready var on_hand_sprite = $OnHandSprite
just dont type the $Sprite part because it will give u an error
what is unhandeled input and how it differs from handeled input?
how would you go about this in an isometric game having 8 possible rotations
how can i flip with this , this is not sprite . sorry , can you help me ?
Hi sorry to trouble you but i have a question, what if i want a different attack animation for different weapons like for example a normal sword has basic attack animation but a legendary sword will have some fancy spinny attack animations, how can i implement this?
You would have to create your own custom animations for that. Within your code you would do something like an if condition whenever your player is holding the special weapon to play a different attack animation rather than the normal one.
@@Arkeve thank you very much this helped me out a lot!
@@plaguenano9661 Good luck on your game!
Is it possible to do this with animated sprite instead of animation player?
What software you use for editing
ما هوا البرنامج المستخدم في رسم البيكسل
can you also change the hitbox with this
This there a tutorial like this but for unity?
I know this is a really old video but could this work on a players body for armor?
I think it technically could work but it would likely look very stiff since body armor usually needs to change shape with the character's body animation. I guess it all depends on the level of detail on your character sprites and how well animated they are.
When you put on the various weapons. Do you attach the weapon node to the character and just change the sprite when need be?
Yup that's essentially it, change the texture of the Sprite node to a different weapon image.
@@Arkeve I noticed you had sprite nodes for things like pants and hair etc. This is all so new for me. :D
@@muajin You'll get the hang of it eventually! Yeah i keep them on separate sprite nodes so I can mix and match different clothing and such
@@Arkeve I gotcha. Thus being able to customize characters easily. Cool
@@Arkeve Now i just need to learn how to code. I'm like below beginner on godot coding. :D
My idle animation has 3 frames per body part, while my running animation has 5...how do you manage these different sizes for animation? I also heard about AnimatedSprites but I cannot figure out how you achieve this:(
It would be easy to have the same number of frames for every animation but there must be another way right?
Just decrease the amount of frames in the anim player
Is there a way to contact you?
Yes but 3D?
Does this work with unity?
I mean yeah great tutorial but you should really stop using key shortcuts, it makes it so hard for people to understand what you are doing. Just hover over it with your mouse so we can see what you are doing.