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

КОМЕНТАРІ • 83

  • @ChronoNewton
    @ChronoNewton 4 місяці тому +4

    This tutorial really helped me learn a lot of essential ideas/concepts for gamedev, thanks!

  • @christopherng9953
    @christopherng9953 3 роки тому +11

    Very very underrated stuff, seeing both sides of drawing and code was perfect! Thanks

  • @beegbrain
    @beegbrain 3 роки тому +4

    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 !

  • @GetLearnt
    @GetLearnt 4 роки тому +3

    Just found this video on the subreddit. Great stuff, you've got yourself a new sub! Looking forward to more quality tuts and logs. :)

    • @Arkeve
      @Arkeve  4 роки тому +1

      Thank you!! Appreciate the support! Hope you will enjoy the coming tutorials and devlogs! :)

  • @gustbraga2736
    @gustbraga2736 4 роки тому +4

    this actualy helped me a lot, thanks for that! btw your videos are so well edited, good work man :) +1 subscriber

    • @Arkeve
      @Arkeve  4 роки тому

      Thank you! That means a lot :)

  • @MrMutluOne
    @MrMutluOne 4 роки тому +2

    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

    • @Arkeve
      @Arkeve  4 роки тому

      Glad to hear it! Yeah i will definitely plan on making those types of tutorials down the line! Stay tuned!

    • @anouaraja7256
      @anouaraja7256 4 роки тому

      @@Arkeve yeah i YOINKED your method too :D thank you!

  • @PinionTRose
    @PinionTRose 3 роки тому +1

    This was a MAJOR help! I truly appreciate this!!

  • @alphacat4927
    @alphacat4927 4 роки тому +1

    Dude thanks you teach well and I hope your channel goes far.

    • @Arkeve
      @Arkeve  4 роки тому

      I appreciate that!

  • @jaredjones6570
    @jaredjones6570 2 роки тому

    This is pure gold! TYSM!

  • @blackmoon1534
    @blackmoon1534 4 роки тому +1

    Perfect Tutorial

  • @bill_makes_games
    @bill_makes_games 3 роки тому

    Awesome godot tutorial videos! Your game looks sweet too! Subscribed!

  • @idlekrisp
    @idlekrisp Рік тому

    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

  • @harshadsaykhedkar1515
    @harshadsaykhedkar1515 2 роки тому

    Brilliant idea!

  • @GregoryHouse92
    @GregoryHouse92 6 місяців тому +1

    Btw do you really need to make Idle for each side? Couldn't you just use the flip_h = true?

  • @NevoskiStudios
    @NevoskiStudios 4 роки тому

    Great tutorial!

    • @Arkeve
      @Arkeve  4 роки тому

      Thank you!!

  • @pekingfisch7495
    @pekingfisch7495 2 роки тому

    thanks JUST THANKS you helped me so much!

  • @Asbjornn
    @Asbjornn 3 роки тому

    Very helpful! Thank you :D

  • @shirotonbo6315
    @shirotonbo6315 2 роки тому +3

    Nice but who holds a sword like that 😂

  • @muajin
    @muajin 4 роки тому

    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!

  • @YBKVexer
    @YBKVexer 11 днів тому

    What if your item is in your innovatory and you want to click equip like there no bar it’s all in a inventory

  • @tanhvi3679
    @tanhvi3679 3 роки тому

    Gold!

  • @cookieBadger
    @cookieBadger 3 роки тому +3

    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.

    • @cookieBadger
      @cookieBadger 3 роки тому

      @Maddux Amos why would you need to do that...

  • @チィウヴァンフォン
    @チィウヴァンフォン 2 роки тому

    thank you so much 😆😆😆

  • @plueschAMAZONE
    @plueschAMAZONE 3 роки тому

    very helpfull work!

  • @bat-stranger3067
    @bat-stranger3067 3 роки тому +3

    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.

    • @GregoryHouse92
      @GregoryHouse92 6 місяців тому

      Did you code it in the script or did you make an animation for each side?

    • @bat-stranger3067
      @bat-stranger3067 6 місяців тому +1

      @@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.

    • @GregoryHouse92
      @GregoryHouse92 6 місяців тому

      @@bat-stranger3067 Do you mind telling me how? Was it just flip_h = true or was there more work involved?

  • @btvoidx
    @btvoidx 3 роки тому

    Thanks.

  • @originalmusic8103
    @originalmusic8103 4 роки тому

    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.

  • @jamessteele9170
    @jamessteele9170 2 роки тому

    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.

  • @cmds.learning7426
    @cmds.learning7426 4 роки тому

    cool ...i need this

  • @theplaymakerno1
    @theplaymakerno1 4 роки тому +1

    Hello! Thank you!
    How are you moving the sprites (clothes) with the body?

    • @Arkeve
      @Arkeve  4 роки тому +1

      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.

  • @soviet3918
    @soviet3918 2 роки тому

    excellent tutorial, i just wanted to know if i can (by script or animation) change the Z order of the sprites

  • @tomppeli7727
    @tomppeli7727 2 роки тому

    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

  • @liwatra
    @liwatra Рік тому

    My question is why did we make a new player scene when we already had one?

  • @zerotohero6402
    @zerotohero6402 4 роки тому

    Waiting for the next serie

  • @SacredDodo
    @SacredDodo 3 роки тому

    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.

  • @GamerPlaya12
    @GamerPlaya12 3 роки тому

    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??

  • @freedomofthought77
    @freedomofthought77 2 роки тому

    But if my Input Key depends on the slot of my hotbar that the item is, how I supposed to do?

  • @muajin
    @muajin 4 роки тому

    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.

    • @Arkeve
      @Arkeve  4 роки тому

      Im not sure i understand, could you clarify a bit more?

    • @muajin
      @muajin 4 роки тому

      @@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.

  • @warmfingy9244
    @warmfingy9244 5 місяців тому

    What is this called so I can search up a tutorial for unity?

  • @youbadassXneb
    @youbadassXneb 3 роки тому

    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

  • @AndrewOBannon
    @AndrewOBannon 3 роки тому

    what is unhandeled input and how it differs from handeled input?

  • @sie85
    @sie85 2 роки тому

    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 ?

  • @sohil20000
    @sohil20000 4 місяці тому

  • @plaguenano9661
    @plaguenano9661 3 роки тому

    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?

    • @Arkeve
      @Arkeve  3 роки тому

      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.

    • @plaguenano9661
      @plaguenano9661 3 роки тому

      @@Arkeve thank you very much this helped me out a lot!

    • @Arkeve
      @Arkeve  3 роки тому +1

      @@plaguenano9661 Good luck on your game!

  • @marcgedeon2434
    @marcgedeon2434 3 роки тому

    Is it possible to do this with animated sprite instead of animation player?

  • @aarushbhatia5140
    @aarushbhatia5140 3 роки тому

    What software you use for editing

  • @بكر-ش7ض
    @بكر-ش7ض 2 роки тому

    ما هوا البرنامج المستخدم في رسم البيكسل

  • @rudy_kolibri
    @rudy_kolibri 2 роки тому

    can you also change the hitbox with this

  • @Cjoudan
    @Cjoudan Рік тому

    This there a tutorial like this but for unity?

  • @carterroo7842
    @carterroo7842 Рік тому

    I know this is a really old video but could this work on a players body for armor?

    • @Theely
      @Theely Рік тому

      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.

  • @muajin
    @muajin 4 роки тому

    When you put on the various weapons. Do you attach the weapon node to the character and just change the sprite when need be?

    • @Arkeve
      @Arkeve  4 роки тому

      Yup that's essentially it, change the texture of the Sprite node to a different weapon image.

    • @muajin
      @muajin 4 роки тому

      @@Arkeve I noticed you had sprite nodes for things like pants and hair etc. This is all so new for me. :D

    • @Arkeve
      @Arkeve  4 роки тому

      @@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

    • @muajin
      @muajin 4 роки тому

      @@Arkeve I gotcha. Thus being able to customize characters easily. Cool

    • @muajin
      @muajin 4 роки тому +1

      @@Arkeve Now i just need to learn how to code. I'm like below beginner on godot coding. :D

  • @die3Brocken
    @die3Brocken 3 роки тому

    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:(

    • @die3Brocken
      @die3Brocken 3 роки тому

      It would be easy to have the same number of frames for every animation but there must be another way right?

    • @anamikarani4768
      @anamikarani4768 2 роки тому +1

      Just decrease the amount of frames in the anim player

  • @ami7mina
    @ami7mina Рік тому

    Is there a way to contact you?

  • @23ZeuZ23
    @23ZeuZ23 3 роки тому

    Yes but 3D?

  • @imajorityi
    @imajorityi 3 роки тому

    Does this work with unity?

  • @nomoyohoo5232
    @nomoyohoo5232 2 роки тому

    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.