2D MELEE COMBAT in Unreal Engine 5 - Beginner Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ก.พ. 2025

ความคิดเห็น • 298

  • @CobraCode
    @CobraCode  2 ปีที่แล้ว +27

    Get my 12 hour course on how to make 2D games with Unreal Engine:
    tinyurl.com/Ultimate2D
    For everybody who's coming from the 'How to make a 2D game in unreal engine 5' and directly adding this to that project.
    When you add the attack animation and it won't show up it probably means that on tick you are overriding it and just setting it back to idle or walking. You can just disconnect tick for now and keep on going with the video until you come to the part where we add the IsAttacking boolean, You can then add a branch on tick and only execute it if isAttacking is FALSE.

    • @ΣτελιοςΧατζηφωτιου
      @ΣτελιοςΧατζηφωτιου 2 ปีที่แล้ว

      I did what you said and it worked fine until i came across the part where we setup the get hit and death animations where it does nothing i checked everything and it still doesnt play them. everything else works perfectly. Also thank you for the amazing tutorial

    • @GxFrosty
      @GxFrosty 2 ปีที่แล้ว

      @@ΣτελιοςΧατζηφωτιου I ran into the same problem. It seems to be doing the same exact thing as the Attack anim to the Idle Anim. The Idle Anim is once again overwriting the Get hit and Death Anim.

    • @demonpuked
      @demonpuked 2 ปีที่แล้ว

      @@GxFrosty Were you able to find a solution?

    • @Sparky617
      @Sparky617 2 ปีที่แล้ว

      @@demonpuked I still can't figure it out. I've spent 10 solid hours and have come up with nothing...

    • @石正杰-r6g
      @石正杰-r6g 2 ปีที่แล้ว +1

      @@Sparky617 Me too.I give up.

  • @Verzach3
    @Verzach3 2 ปีที่แล้ว +9

    Nah men, you're the beat, keep up the hard work with this Paper2D tutorials

  • @romen76sheep46
    @romen76sheep46 2 ปีที่แล้ว +13

    Thanks! You're making dreams come true for people who wanna make their own games.

  • @AvectaInteractive
    @AvectaInteractive ปีที่แล้ว +1

    Such a great tutorial and as someone new to Unreal and those nodes they have been quite intimidating. But this made me feel a lot more relaxed about it seeing how they flow.

  • @CobraCode
    @CobraCode  2 ปีที่แล้ว +15

    Glad I finally got around to do this one!
    Was a blast to make and the free assets from these awesome artists really turned it into something special!

    • @modytech2977
      @modytech2977 2 ปีที่แล้ว +1

      Hey Cobra Code, i have a question, Do you have a special Course for making 2D game in UE4,5 like in udemy or somewhere else?.

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว +1

      @@modytech2977 Hey! I currently only have content on TH-cam, but I do have plans to make a few udemy courses, probably also about 2D games! I will make an announcement on the channel once I get started with that!

    • @modytech2977
      @modytech2977 2 ปีที่แล้ว +2

      @@CobraCode yeahhhhhh lets go, and please tag me when u have it done on udemy i will be the first student.😁😁😁
      Thank you😊

  • @Donutsaurz
    @Donutsaurz 2 ปีที่แล้ว +8

    Cobra thank you so much for these videos! I've learned so much in my first week of using UE4/5! Please keep making more!

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว

      Awesome :D
      So glad to hear that

  • @Tonytaylormusic
    @Tonytaylormusic ปีที่แล้ว +1

    this has really helped me understand a bit of game logic, thank you

  • @renepavkovic3752
    @renepavkovic3752 2 ปีที่แล้ว +3

    Ty for the amazing video. I have been trying to get into UE5 for about 6 months but this is the first time i have actually build something or done anything at all. I love the pace of the videos and the ammount of content shown. Now i have to struggle with making actors and other characters. Best of luck to you :)

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว +1

      Thank you so much!
      I'm glad you were finally able to take that first step and get things rolling.
      I hope you can keep it up :D

  • @JdR2V
    @JdR2V 2 ปีที่แล้ว +4

    Thank you SO MUCH! This is exactly what I needed for so long!

  • @alexanderbjorklund6971
    @alexanderbjorklund6971 ปีที่แล้ว +1

    Very very helpful! Please make more videos like these, you’re the only one to make it this good!

  • @DANTE-oi2qw
    @DANTE-oi2qw ปีที่แล้ว +1

    Great video , Helped me a lot for my university project 👍

  • @sinho113
    @sinho113 2 ปีที่แล้ว +2

    wow i just started a project today exactly like yours
    bro thanks it will help!

  • @_justus_1239
    @_justus_1239 2 ปีที่แล้ว +1

    Thanks for the video, I've been waiting for this for a long time 😅👍

  • @jamesbarker117
    @jamesbarker117 2 ปีที่แล้ว +4

    Amazing, by far the best UE5 guide channel on YT right now.
    I imagine this is covered in another video but im wanting to attack an enemy, that is not a mirror of my current Blueprint (in your case you have two identical samaurai). I want to give all the "was hit, is dead" conditions to another Blueprint I.E for an BP_Enemy... I a true begginer so theres probably something basic i dont know. I will keep watching your stuff and im sure ill find it=. Thanks

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว +2

      Thank you :D
      What you're talking about is called 'inheritance' and a property of many object oriented programming languages. Since Blueprints are based on C++ we also can use inheritance in blueprints. I don't think I made a video talking about that yet, but you'd basically create a base blueprint for BP_Character for example which has was hit, is dead and so on.
      Then you'd create a child blueprint of it for BP_Samurai and another child for BP_Enemy.
      That way you could put shared functionality in the BP_Character and the things that are unique to each character in their respective child blueprint.
      I think you should probably find info about it when searching for blueprint inheritance, child blueprint or so on!

    • @jamesbarker117
      @jamesbarker117 2 ปีที่แล้ว +2

      @Cobra Code ahhh yes I see. I will look into that! Really appreciate the info. Good luck with your next videos matey I will be watching

  • @Karce963
    @Karce963 2 ปีที่แล้ว +1

    Thanks a ton for this! I'm really looking forward to trying this node-based programming.

  • @wellingtonipf
    @wellingtonipf 2 ปีที่แล้ว +5

    Amazing job man! Subscribed! :)

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว

      Thank you :D

  • @KahL1One
    @KahL1One 2 หลายเดือนก่อน +2

    This is near perfect BUT need this for character movement AND attacking.

  • @_justus_1239
    @_justus_1239 2 ปีที่แล้ว +18

    Please make more 2d videos😍

  • @lt.facepalm9566
    @lt.facepalm9566 2 ปีที่แล้ว +2

    Thanks for this! Any chance you could do a tutorial video about turn based rpg combat games one day? The tutorials im seeing all have pretty big flaws to them, functionality wise, or they are very poorly explained. I've been struggling for at least a year trying to get into programming, and your pace made me able to work out my own things and start understanding since the first video i saw from you a couple weeks ago. I have severe ADHD and your format is phenomenal at keeping me around at all, you make it easy to "get it". I am not one to solicitate for special requests but I think you could outshine all these other tutorials and it does seem like theres a lack of people covering the subject. If its not your thing, totes understand, ill keep looking around. Cheers!

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว +2

      Hey!
      Thank you so much for all the kind words and the video suggestion!
      I've been working really hard trying to make the videos engaging and well paced, so I'm really glad to hear it seems to be working out :D
      I do have plans to make a tutorial about pokemon style turn based combat, but there are still a lot of things I need to do research on before I can confidently cover that topic, so it will still take a long time.

    • @lt.facepalm9566
      @lt.facepalm9566 2 ปีที่แล้ว +1

      @@CobraCode no problem, dont overwork yourself, ill keep my eyes peeled. thanks for the reply!

  • @romen76sheep46
    @romen76sheep46 2 ปีที่แล้ว +5

    To everyone struggling with going from the "how to make 2D platformer" to this.
    Here's the solution I got. Follow "Update animation (red)" - "set flip book (blue)"
    [if you followed his 2Dplatformer video this will be linked to a "select (green)" for jumping/falling flipbook. Break connection and then continue below]
    from here you make a "select (green"
    From here I set "True" to whatever you named your input action. (Like shown in video above) then drag false to the "select (green)" to where your jump/fall flipbook select was.

    • @SAMAR_178
      @SAMAR_178 2 ปีที่แล้ว

      i didn't understand your last line could you please elaborate (From here I set "True" to whatever you named your input action. (Like shown in video above) then drag false to the "select (green)" to where your jump/fall flipbook select was.) this line

    • @romen76sheep46
      @romen76sheep46 2 ปีที่แล้ว

      @@SAMAR_178 check cobras pinned comment. He did a better job of explaining which ties into the next video he has

    • @SAMAR_178
      @SAMAR_178 2 ปีที่แล้ว

      @@romen76sheep46 can you give me the link please?

    • @croppedcrit8812
      @croppedcrit8812 2 ปีที่แล้ว +1

      please, I've tried to understand, you were doing so good, that last bit though, I dont get, didn't understand in Cobra comment either, "from here I set "True" to whatever you named your input action, (Like shown in the video above) than drag etc., etc.
      can you time stamp for the video above part, and what do you mean by input action, going strictly off the code from the first video, following this code. than disconnecting the far right flipbook, from the green select you talked about in the animation section of blueprints. what exactly am I filling that break point with. what goes there.
      if my rant makes since, pls help.

  • @RockyMulletGamedev
    @RockyMulletGamedev 2 ปีที่แล้ว +2

    Great Unreal 2D stuff !

  • @KratonWolf
    @KratonWolf 2 ปีที่แล้ว +4

    There's a couple of things I noticed in this that you did that were potentially a bit inefficient. Not wrong, just maybe short-sighted if this game you're making will be eventually expanded upon.
    1. Your Hit Check function just applies damage where you/the player is doing the hitting (single player), and where any combat is free for all (enemies can hit each other, as well as you). A slightly better way to do this would be to include a boolean for Is AI Controlled and a branch to split it up, and further have a separate class filter for player characters/allies from AI Characters/enemies. Doing this would allow you to have multiplayer teams (or Factions, for instance), where enemies can't attack each other, and co-op partners also can't attack each other. Essentially removing Friendly Fire, while leaving an easy opportunity to allow PVP damage even if they're not AI controlled (for instance, having more specific class filters, one for each "team").
    2. The method you use for doing damage is good for a game where there's only 1 attack, but if the game were to be expanded to include multiple kinds of attacks (such as most beat-em-up games), an enum can be used to determine which attacking state you're in from your inputs. We can call that AttackingType, and use Switch on AttackingType and put that in a Handle Damage function, where the return value is the set amount of damage (and whatever calculation is used to get that amount) from the type of attack being used. You can also use another enum for the animations for attacking, blocking, throwing, special attacks, etc, to determine which animation should be played from the action being done. If the action being done is an attack as well, you can have the Hit Check follow the attack animation function. For instance, when Is Punching is true, you call the Handle Punching function for the animation side of it, and then the Hit Check after that, this way you can still punch mid-air and miss, and all the animation effects of that miss will play out, then Hit Check determines if the punch hit anything, and plays out everything else.
    Both of these things are not replacing what you do in the video, just expanding upon them to allow you to more easily add in extra attacks or combos down the road without having to redo your code, just adding more states to your Enums and voila!

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว +1

      Thanks for the long comment!
      Yeah I certainly agree with you and that's actually the way I do it in my beat 'em up devlog series.
      However I wanted to keep this video in particular simple for beginners and not overload it with too much information.

    • @KratonWolf
      @KratonWolf 2 ปีที่แล้ว +2

      @@CobraCode ah ok, either way it's a great video!

  • @TheSokkaYT
    @TheSokkaYT 2 ปีที่แล้ว +1

    Right when I needed it, thanks :)

  • @FanaticChain
    @FanaticChain 2 ปีที่แล้ว

    Can’t wait till it’s released on steam!

  • @readinghotline
    @readinghotline 2 ปีที่แล้ว +6

    when i press the attack button it just restarts the idle animation, not quite sure how to fix it

    • @jordyrobijn
      @jordyrobijn 2 หลายเดือนก่อน +1

      same

  • @ULTRADARKSETH
    @ULTRADARKSETH ปีที่แล้ว +1

    Brilliant! Thank you

  • @kaigorodaki
    @kaigorodaki 2 ปีที่แล้ว +1

    It'd be cool to play this game

  • @AliArcade7
    @AliArcade7 2 ปีที่แล้ว +1

    thank you very very much . very useful tutorial 💙

  • @muzz2108
    @muzz2108 2 ปีที่แล้ว +1

    It would be nice if this could tie back to your previous 2D tutorial for more advanced game controls, attempting to apply this to your previous tutorial is not working as well as I'd hoped, well, not at all tbh.

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว +1

      Thanks for the feedback!
      Yeah I was considering that, but I felt like it would alienate everybody who didn't watch that video but just wanted to know about combat. I thought combining them would be easy enough to figure out, but It's a bit more complex than that.
      Still not quite sure how to best handle building off of previous content without making it a hard prerequisite.
      I do plan on making longer 2D tutorials that are 1 hour+ long and full game slices, so that would hopefully show how to combine these things.

    • @uraharashinsuke8652
      @uraharashinsuke8652 2 ปีที่แล้ว +1

      @@CobraCode Thanks for the tutorial, Looking forward to your full game slices! ! !

  • @TheCreaperHead
    @TheCreaperHead ปีที่แล้ว +3

    Here's how to do the animation fix that cobra code said in the pinned comment!!
    1. Go to your "Event Tick" that has the get "is attacking" connected along side it to a branch. The Event tick will be connected to True.
    2. set your "Animation Update" and your "Update Control Rotation" nodes to "False" on the Branch
    Done!

    • @TheCreaperHead
      @TheCreaperHead ปีที่แล้ว

      This only applies if you came from another video to where Cobra shows you how to set up your idle, walking and jumping/falling animations. So if you don't have the "Animation update" and "Update Control Rotation" nodes then just ignore these comments!

    • @ssneakyandfriends1626
      @ssneakyandfriends1626 ปีที่แล้ว

      still doesn't seem to work, all my animations just break after the attacking animation (walking, sleeping, and even attacking)
      they just don't seem to start playing at all, just goes all virtual insanity on me.

    • @TheCreaperHead
      @TheCreaperHead ปีที่แล้ว

      @@ssneakyandfriends1626 sounds like you broke something on your end that you will need to find :/

    • @ssneakyandfriends1626
      @ssneakyandfriends1626 ปีที่แล้ว +1

      @@TheCreaperHead seems something about [on finished playing] doesn't sit right with how I things have set up, so a delay (on the attack function) for roughly how long the attack animation takes to play seems to work.

  • @zocker334
    @zocker334 2 ปีที่แล้ว +4

    Hey Cobra Code your 2D guides are awesome. Can you make a simple Enemy Respawner for 2d that only respawn Enemy when he is dead ? :)

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว +1

      Thank you and thanks for the suggestion!
      But I think that wouldn't be that interesting of a topic for a video.
      I'd need to find a way to combine it with a bigger overarching concept to make it more interesting.

    • @croppedcrit8812
      @croppedcrit8812 2 ปีที่แล้ว

      @@CobraCode I mean, there are tons of those infinent enemy spawners, its like 2d top down. vampire survivors being the best example. would actually love the idea mentioned above, and it could be part of a vampire survivors style type of game. also, thanks for the awesome tutorials. im working on linking this to existing stuff. its a good challenge.

  • @legion7616
    @legion7616 ปีที่แล้ว +3

    When I press my attack animation nothing happens to my character?

  • @madman10769
    @madman10769 2 ปีที่แล้ว +3

    Can you please make a 2D enemy AI tutorial, as well as implementing combat into it?

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว +1

      Hey, thanks for the suggestion.
      Yes I do have plans on making 2D Ai, but not quite sure yet how to structure the video since there are many prerequisites that are needed. So maybe better just include that in a full 'how to make a 2d platformer' video or so on which goes into many different things

    • @madman10769
      @madman10769 2 ปีที่แล้ว

      @@CobraCode oh ok 👍

  • @jephrennaicker4584
    @jephrennaicker4584 2 ปีที่แล้ว +1

    Quick question on the part of adding the particle effect, where did you get it, or do you have a video on that? thanks

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว +1

      Hey!
      I think that's an asset pack I purchased on the Unreal Engine Marketplace.
      I've you've been picking up the free assets each month you should probably have some particle effect packs in your library right now.
      You might need to buy something or create something yourself though that fits the pixel art style.

    • @jephrennaicker4584
      @jephrennaicker4584 2 ปีที่แล้ว +1

      @@CobraCode thanks again, I actually had no idea they gave out free, stuff in the market place only logged on for the free games from epic 😅

  • @burgerlord7530
    @burgerlord7530 ปีที่แล้ว +1

    Hi, I just wanted to say you have great tutorials and they've all helped me so far in making my game. I do have a question, though, I have watched this video through several times and for some reason the hit detection isn't working (specifically, it's not printing anything when the hitbox collides with the enemy), is there any sort of fix? If it changes anything, I have followed your 2d side scroller and PaperZD tutorials.

    • @CobraCode
      @CobraCode  ปีที่แล้ว

      Thank yo so much :)
      There are multiple reasons why this could happen, so it will be a bit hard for me to help with debugging.
      The first thing is that the collision channels might not be set up correctly on the player capsule and the hitbox.
      Outside of that the only real way to figure it out is to follow the execution path step by step and put in print strings to see where you stop getting the expected result.

    • @burgerlord7530
      @burgerlord7530 ปีที่แล้ว

      @@CobraCode Hey thank you for getting back to me so quickly! So, the hitbox is a component of the sprite, if I make it a component of the capsule itself as is shown in the video, the hitbox won't rotate with the player.

    • @CobraCode
      @CobraCode  ปีที่แล้ว

      @@burgerlord7530
      Even if attached to the capsule it should rotate, so that's probably the issue you'll first want to look into

    • @burgerlord7530
      @burgerlord7530 ปีที่แล้ว

      @@CobraCode Do you know what could be the cause of it? Because I followed this tutorial exactly in terms of the hitbox and it still won't rotate, I've even tried to do other things like connect the hitbox to the "update control rotation" event and it still isn't working.

    • @burgerlord7530
      @burgerlord7530 ปีที่แล้ว +1

      @@CobraCodeOkay so what I found out is because of how I have it set up (through paperzd, with animation sources and anim blueprints) the player blueprint can't check the frame that the current animation is on. So instead, I have hit check set up as a notify on the animation source itself.

  • @miklusch4941
    @miklusch4941 2 ปีที่แล้ว +1

    Does it also work well with the PaperZD Plugin ? Or are there better ways to create melee combat attacks? I am an absolute beginner and just created the PaperZD character. Ty for help :)

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว

      Yes, but the way you go about it will be slightly different.
      Instead having to check for the attack frame to trigger the hitbox on tick, you can just use an anim notify with PaperZD, which is much simpler.
      And all the changes for your animation states will take place in your animation blueprint. You could transition into the attack animation through a conditional check or just use a jump node and force jump to it from the blueprint.
      If you've watched my PaperZD tutorial you should know what I mean :)

    • @miklusch4941
      @miklusch4941 2 ปีที่แล้ว

      @@CobraCodeOkay, thanks for explaining it to me. I will try it !

  • @kratos3200
    @kratos3200 ปีที่แล้ว +1

    Hello to add another player is the same as adding player one right? Sorry for bad inglish

    • @CobraCode
      @CobraCode  ปีที่แล้ว

      Yeah adding a second player isn't that hard with unreal engine, however you are probably better off using a player spawn object instead of having the blueprint right in the level because that way the correct players will already possess the actor.
      Here's a good article about that topic:
      unrealcommunity.wiki/local-multiplayer-tips-993f4t24

  • @keallan123
    @keallan123 หลายเดือนก่อน

    not sure if you still read comments on videos from 2 years ago
    your tutorials are really helpful and much appreciated. i was just wondering if there's a way to apply damage on 2 different frames of a playbook as my attack is 2 motions in one playbook i tried a and node for frame 3 and 10 but i think the do once node cancels the frame 10 damage out

    • @CobraCode
      @CobraCode  หลายเดือนก่อน

      Hey!
      I know exactly what you're talking about.
      Something like Ryu's Forward Hard Punch command normal that has active frames spread out throughout the animation.
      For more complex things like that I suggest you look into using the free PaperZD plugin, that makes handling hitbox states like that much simpler.
      With the method shown in this video you'd have to come up with some way to reset the do once before the second attack frame starts.

  • @imraan_alam
    @imraan_alam 8 หลายเดือนก่อน

    is it possible to use bone animation instead of flipbook ? incase i am using hand-drawn png instead of pixel art

    • @CobraCode
      @CobraCode  8 หลายเดือนก่อน

      Yes, but currently only with paid plugins such as 'Spine'.
      Ender Lilies and Detained: Too good for school use it.

  • @Reyoso
    @Reyoso 2 ปีที่แล้ว +1

    yes yes yessssssssssss THANK YOU!

  • @jamesbarker1994
    @jamesbarker1994 2 ปีที่แล้ว +1

    Amazing

  • @ZaynNaz
    @ZaynNaz 2 ปีที่แล้ว +1

    Great tutorial! However, couldn't you use enums to define a movement state to make things a little easier in coding the states?

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว +2

      Yes you certainly can!
      Just wanted to keep it simple for this video to not confuse anyone.
      Might make an advanced combat tutorial in the future going through the whole process of making a state machine and implementing multiple attacks with different hitboxes.

    • @ZaynNaz
      @ZaynNaz 2 ปีที่แล้ว

      @@CobraCode Ah okay, that makes sense it is only a beginner tutorial haha -- I would love to watch that and learn an advanced method of 2d combat! I hope you do decide to make that tutorial. Also if you ever have the time in the future, I would love to see an expa.nsion of that, air combos and directionals

  • @goskry7358
    @goskry7358 2 ปีที่แล้ว +1

    Pls Create a video: how to make a inventory for 2d game

  • @duramondash40
    @duramondash40 2 ปีที่แล้ว +1

    Thanks a lot for the video friend, make more 2D videos, Unreal is good for 2D

  • @TimothySchidlowski
    @TimothySchidlowski 7 หลายเดือนก่อน

    This works fine when the animation goes back to idle after attacking, but now what about the run animation? Am I missing something ?

  • @sii-gul5852
    @sii-gul5852 2 ปีที่แล้ว +1

    Need Help, Similar to another Comment, but when I attack the enemy, it does not play any animation? I then put a destroy actor to test the damage and it works but just no animation?

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว

      Hey, you did the base 2D tutorial with the fox and then build this on top of it, right?
      In that case the idle/walking state is fighting with the attack state since on tick you ALWAYS set back to idle or walking and ignore the attack.
      In that case you'll need to add a branch after tick and ONLY execute the setFlipbook to idle or walking if IsAttacking is NOT true, if it's true you don't really need to execute anything.

    • @sii-gul5852
      @sii-gul5852 2 ปีที่แล้ว +1

      @@CobraCode ahhh yes sorry, what I mean is that, everything works but the hit and death animations

  • @doomdyt
    @doomdyt 2 ปีที่แล้ว +1

    Could you do a "How To Import 3d Models into UE5" tutorial? I tried following the 2d hybrid, but you skipped that part

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว

      Hey, there's already a lot of videos covering this topic and I don't think there's really anything I would be able to add to that:
      th-cam.com/video/lqLA2J_XZWo/w-d-xo.html

  • @Take22952
    @Take22952 ปีที่แล้ว +1

    If I may ask, may you do a tutorial on how to crouch in 2D without moving the camera while crouching?

    • @CobraCode
      @CobraCode  ปีที่แล้ว +1

      Hey, I guess when you crouch you shrink down the capsule component in your character which then causes your attached camera to move?
      I actually haven't done that yet, so can't give any practical advice, but sounds like something you'll need a bit of a hacky solution for 😅

    • @Take22952
      @Take22952 ปีที่แล้ว

      @@CobraCode Ah. No worries. Thanks

  • @antlermind
    @antlermind 2 ปีที่แล้ว +2

    For some reason the 'Set Flipbook' functions following the branch off Event Any Damage won't work for me. I placed a printstring ahead of each, following the branch, and those wrote to log just fine. I also placed a 'Destroy Actor' node on the true leg of the branch, and the actor is properly destroyed after 200 damage is dealt. Any idea why the flipbooks wouldn't be working?

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว

      If you only right click on the event graph and try to look for 'set flipbook' it won't show up if you set 'context sensitive' to true.
      You first need to place a reference to the sprite and then drag a line off from that, you should then be able to see 'set flipbook' :)

    • @antlermind
      @antlermind 2 ปีที่แล้ว

      @@CobraCode Hey thank you for the reply! Though, the 'Set Flipbook' nodes show up just fine, and I have them in the graph, they just don't change animations on the sprite for some reason. Like I said, print strings are firing off in place of the 'Set Flipbook' nodes just fine, along with a 'Destroy Actor', which also works as expected. Just no animation change upon hit/death (with 'Set Flipbook' nodes in place.)

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว

      @@antlermind Oh I see, sorry for the misunderstanding. I think something somewhere is then overriding your flipbook animation and setting it back to the idle instantly.

    • @antlermind
      @antlermind 2 ปีที่แล้ว +1

      @@CobraCode Yeah this must be the case, I've yet to find it.. But I will keep looking!! Thank you again for all you do :)

    • @sii-gul5852
      @sii-gul5852 2 ปีที่แล้ว

      @@antlermind Have you figured this out? i have a similar problem?

  • @ryan5412
    @ryan5412 ปีที่แล้ว +1

    Any chance older videos like this will get an update to use PaperZD?

    • @CobraCode
      @CobraCode  ปีที่แล้ว +1

      Hey thanks for the suggestion.
      I don't think I'd just remake them in PaperZD, but cover the same concept with different assets in a slightly different way.
      You'd still learn the same thing though.

  • @fade2k560
    @fade2k560 2 ปีที่แล้ว +1

    Goooood job

  • @snailll
    @snailll ปีที่แล้ว

    Hi, ive been following the tutorial and im stuck, im in unreal 5.3 and im not doing it that when you hit the player im doing it for a seperate enemy but for some reason the text wont appear telling me how much damage ive dealt, im at 5:18 now, what should i do?

    • @CobraCode
      @CobraCode  ปีที่แล้ว

      There might be an issue with your collision channel settings or what you're casting to.

  • @Zaytonator24
    @Zaytonator24 ปีที่แล้ว +1

    hey, im not sure if youre still replying to comments on here due to the amount of time since this was published, but im stumped at the hitcheck part, ive done everything the same as youve done but its not working as it should, the print statement when i hit something is being called when i attack, im not sure why, and the sound plays when the attack animation runs too, its not triggering when i hit something, and even then its only playing once and then it stops working all together, some help would be appreciated as im very new to unreal and have hardly any clue what im doing lol

    • @CobraCode
      @CobraCode  ปีที่แล้ว

      Hey, I do try to reply when I'm not too busy.
      Sorry but it's pretty hard for me to know what the issue could be from just that information.
      Even if you're using a newer version of Unreal like 5.2 for example nothing should have really changed and if you really did follow everything shown in the video step by step without missing something it should work out just fine.
      However it is really easy to just miss a small thing that then just breaks everything, so you might want to retrace your steps and double check that you didn't miss anything.
      Sorry I can't be of more help since from your message it isn't really that obvious to me what is wrong here.

    • @Zaytonator24
      @Zaytonator24 ปีที่แล้ว +1

      @@CobraCode thats completely fine lol, i watched some other tutorials and added some things and in the end got it working, my question was very vague now that ive read it over, cheers for the tutorial however, ill be sure to try out your 2d hybrid games next, they seem pretty cool :)

  • @Il_Tizio
    @Il_Tizio ปีที่แล้ว

    Hey, great video, but can you remake it for the paperZD plugin?

  • @CorleoBabar
    @CorleoBabar ปีที่แล้ว +1

    Does this method work when working with PaperZD? I'm unsure of how to do something akin to Montages in the plugins otherwise.

    • @CobraCode
      @CobraCode  ปีที่แล้ว +1

      Hey!
      No with paperZD you loose access to the 'get position in frames' function since the system works differently.
      The easiest way of doing something like this in PaperZD is with animation overrides which are pretty much like montages for skeletal meshes.
      In the Action Platformer section of my Udemy course that just released today I actually teach that in detail.
      www.udemy.com/course/unreal-2d-course/?couponCode=ULTIMATE2D
      I'll also make a video about anim overrides for TH-cam, but already have other things scheduled, so it's probably gonna be another 1~2 months.

    • @CorleoBabar
      @CorleoBabar ปีที่แล้ว +1

      @@CobraCode Thank you for the quick response!

  • @shengxuanqiu7754
    @shengxuanqiu7754 2 ปีที่แล้ว +1

    谢谢你的视频😁

  • @5framesforever
    @5framesforever ปีที่แล้ว +1

    is it possible to make this but with traces instead of hitboxes, thank you

    • @CobraCode
      @CobraCode  ปีที่แล้ว

      You technically could and that is often done for 3D games.
      Personally haven't ever seen it done for 2D games though since you won't need that much precision.
      If you need a more precise method than this then the usual way of doing it is using hitboxes that are split into multiple parts and give you more control than a single box.

  • @NicksWorld7
    @NicksWorld7 2 หลายเดือนก่อน

    I cant get this to work, I have an IA_Attack thats mapped to my left mouse button and i've tried using both that and just the "left mouse button" event and neither of them will work..

  • @CatKingultra
    @CatKingultra 10 หลายเดือนก่อน

    I’m struggling to get the attack animation to play because of the idle animations set up in your tutorial with the fox dude, do you have any fixes?

    • @CobraCode
      @CobraCode  10 หลายเดือนก่อน

      Hey, you need to create a branch on tick and prevent switching to idle/walking while attacking

  • @Mw1ng0l3
    @Mw1ng0l3 8 หลายเดือนก่อน

    Hi guys, I'm watching the course and the character when is attacking, the enemy receives damage but after attacking if I use the direction buttons the enemy it also takes damage as soon it touches the character hitbox, but later if I don't attack and just use the direction buttons, the enemy doesn't take damage when it touches the character hitbox, I am confused and I don't know what to do

  • @SAMAR_178
    @SAMAR_178 2 ปีที่แล้ว +1

    Hi
    I don't understand this line could you please elaborate more (You can then add a branch on tick and only execute it if isAttacking is FALSE.)
    When I do that my character get visible only when I press input button for melee

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว

      Hey, I think what I'm referring to is IF you already followed the other tutorial with the 2D character that has an idle animation and can walk.
      If you character can only attack, but doesn't switch to idle or walking on tick you don't need this.

  • @progamingeye7948
    @progamingeye7948 2 ปีที่แล้ว +1

    Hey great stuff ! I found out your channel today got so much information great content keep it up and I wanna know how can I customize the characters in 2d like changing outfit or weapon do I have to include a full sprite flipbook everytime if I have to how can I do it ?

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว

      Thank you :)
      Yeah there are multiple ways you could go about it which all have their pro's and con's.
      For outfits I would probably just create another full sprite sheet and make a new flipbook from it.
      But if you want to be able to change armor pieces one by one you might need to separate different body parts, but I don't have much experience with that workflow, so I can't give detailed advice about it.
      If you plan to frequently change weapons it would probably be best to treat them like a separate object which is attached to the character through a socket and changes positions on the attack frames like that.
      Kind of similar like streets of rage 4. They made a really solid system they can reuse across all of their weapons without any extra work.

  • @nook2726
    @nook2726 2 ปีที่แล้ว +1

    Great Tutorial :D, I also have a question, is it possible to in ue5, to make a skin creator that allows the player to make a pixel skin of anything they want (similar to how Minecraft does it)? because I have no idea as of ue5's limitations with blue prints.

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว

      Yeah I think that should be possible, but you'd need to have a good understanding of materials and how to manipulate them

  • @xMcWeenx
    @xMcWeenx 6 หลายเดือนก่อน

    When I go to add a emitter the drop down field is empty for me. Did I miss a step/video/plugin?

    • @CobraCode
      @CobraCode  5 หลายเดือนก่อน +1

      Hey, that was just an example.
      I imported an effects pack from the marketplace.

    • @xMcWeenx
      @xMcWeenx 5 หลายเดือนก่อน +1

      @@CobraCode Thank you for the fast reply! I ended up finding a random effect and using that to understand the process.

  • @blank_arcade
    @blank_arcade 9 หลายเดือนก่อน

    after watching your previous video "how to make a 2d game" And after checking your pinned comment, it's working but my character flickers when he jumps Lol.

  • @andyallen8101
    @andyallen8101 2 ปีที่แล้ว +1

    Can I check where you got the hit particle effect from?

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว

      Hey, I was using one of the effects in this pack!
      www.unrealengine.com/marketplace/en-US/product/good-fx-impact

  • @TDF56
    @TDF56 ปีที่แล้ว

    Hello again cobra seems like the HitPos remains active after the animation plays any fix?

  • @Yozcogaming
    @Yozcogaming ปีที่แล้ว

    I downloaded the assets that were in the description but effects u used werent in them. Where can i get them?

    • @CobraCode
      @CobraCode  ปีที่แล้ว

      Hey, I think the effects were from a temporarily free asset on the Unreal Engine Marketplace.
      Sorry but I'm not too sure anymore which one it was.

  • @KillerDudeT19
    @KillerDudeT19 2 ปีที่แล้ว +2

    How would you block damage?

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว

      A simple block mechanic is actually not that hard.
      You'd just have to create a boolean with isBlocking, then set that to true while the block animation is looping.
      If isBlocking is true the character won't take any damage.
      Then if the player lets go of the button you stop playing the blockanimation and also set isBlocking to false.

    • @KillerDudeT19
      @KillerDudeT19 2 ปีที่แล้ว

      @@CobraCode would this be done in the event all damage?

  • @Call_me_Elena
    @Call_me_Elena ปีที่แล้ว

    Hey Cobra, I'm making a game but I'm struggling: when my character is moving and i click the left mouse button (the one I've chose), the attack animation appears for a moment. Since a player can easily notice this, how can fix it? I mean can you tell me how to attack while moving/ block the character while attacking (both are good, i just want to fix this bug). Please, reply as fast as you can or i can't finish my game :(. Thank you.

    • @CobraCode
      @CobraCode  ปีที่แล้ว +1

      Hey.
      You mean the attack animation only shows up for a bit, but doesn't play completely?
      You're probably overriding it on tick with the idle animation.
      You'll have to use the IsAttacking boolean and put a branch on tick.
      Then only execute the flow of going back into the idle or run animation IF NOT ATTACKING.

    • @Call_me_Elena
      @Call_me_Elena ปีที่แล้ว +1

      @@CobraCode thanks for the fast answer, I'll try that

    • @Call_me_Elena
      @Call_me_Elena ปีที่แล้ว

      @@CobraCode sorry Cobra, now i have another bug, when the character attacks right before landing it blocks till i click the attack button again. How can i solve that?

    • @CobraCode
      @CobraCode  ปีที่แล้ว +1

      @@Call_me_Elena Hey, sorry but that seems like something really hard to debug I can't really help you with through just messages

    • @Call_me_Elena
      @Call_me_Elena ปีที่แล้ว +1

      @@CobraCode don't worry i have changed something in my game so i don't have it anymore, thanks for answering anyway!

  • @theo294
    @theo294 หลายเดือนก่อน

    Hi @cobracode, I have an issue, I used this tutorial for an enemy AI but when I try to onluyhit on the third frame with the "get playback position in frame" it don't apply damage. But when I delete the "get playback position in frame", it worked on the first frame. Any advice of how to fix it ?. Thanks

    • @CobraCode
      @CobraCode  หลายเดือนก่อน

      Hey, maybe in your case the animation isn't 3 frames long and you need to check what frame you really wanna hit at.
      Try to print string the 'get playback position in frames' and see what values you're getting.

  • @armeddreams9141
    @armeddreams9141 ปีที่แล้ว

    I just wanted to ask, do you know how to make a shared camera system, where the camera moves to the average point between multiple players?

    • @CobraCode
      @CobraCode  ปีที่แล้ว

      Yeah I've done that a couple of times.
      I usually just make a blueprint called CameraManager and then put a spring arm and a camera in it.
      You then need to get a reference to the two characters. Then on Tick you calculate the middle point between both and set the actor to that world location.

  • @WspolnaKapiel
    @WspolnaKapiel 2 ปีที่แล้ว +1

    Can You update it according to your last tutorial?
    Here if we add attack animation after click then we have it overrided by idle animation and shit happens.
    Please

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว +2

      Do you mean build this on top of the base of the 'How to make a 2D game in Unreal Engine 5' video?
      I was considering that but I felt like it would alienate everybody that hasn't seen the video and just wants to know about combat.
      You should be able to get both systems working in conjunction by just adding a few branches, but I do plan on making a full fledged 2D game tutorial that is over 1 hour long in the future which includes all of these things.

    • @WspolnaKapiel
      @WspolnaKapiel 2 ปีที่แล้ว +2

      @@CobraCode Maybe You are right.
      Im waiting for full tutorial then!
      Take Your time and thanks for everything!

  • @kakav9818
    @kakav9818 ปีที่แล้ว

    hi cobra code, i saw your tutorial ''make 2d games the easy way in ue5'', and i try to make what you say in the comments, but it dosen't works it's a problem or no? could you help me?

  • @_justus_1239
    @_justus_1239 2 ปีที่แล้ว +1

    Can you do a second part on how to make a 2d game... video

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว +2

      Hey thanks for the suggestion.
      I definitely have plans to make more 2D videos, but I still gotta think of ways to make them interesting to beginners and advanced users at the same time.
      I'm thinking of maybe making longer videos like for example how to make a 2d side scroller in 3 hours. How to make a beat em up in 5 hours or something like that. Still haven't quite decided though.

    • @_justus_1239
      @_justus_1239 2 ปีที่แล้ว

      @@CobraCode Those are really good ideas

  • @SAMAR_178
    @SAMAR_178 2 ปีที่แล้ว +1

    hey how do you create that particle effect?

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว

      The particle effect itself isn't something I created. It came from an effects pack that I bought.
      If you've been using Unreal Engine for a while and have been claiming the free assets each month, you should have a few nice particle effects at this point.
      Then you just need to import it and call Spawn Emitter at location.

  • @thepandadon3425
    @thepandadon3425 11 หลายเดือนก่อน

    I'm really confused. So when I setup the first steps, I try to get it to work but It doesn't seem to play the animation. I can see that when I press the spacebar that my character stops idling for the split second space bar is pressed. But it doesn't do anything. I don't know if I've set something wrong or not, but I followed the first steps all the way to the letter several times. Any ides would be helpful.

    • @CobraCode
      @CobraCode  11 หลายเดือนก่อน

      Hey, your idle animation is overriding the attack animation.
      You'll need a boolean with IsAttacking and set it to true when the attack starts.
      Then on tick you need a branch that ONLY allows you to go back to idle or walking if you're NOT attacking.
      Then if the attack is over you set IsAttacking back to false.

    • @Mw1ng0l3
      @Mw1ng0l3 11 หลายเดือนก่อน +1

      ​@@CobraCode
      I am a complete beginner, and now I am facing the exact same problem, but I could not understand a word you just said,

    • @CobraCode
      @CobraCode  11 หลายเดือนก่อน +1

      Hey, sorry but then this might still be too advanced for you.
      You might need to mess around with blueprints more and do simpler stuff first. I have a couple of other more beginner friendly tutorials.@@Mw1ng0l3

    • @Mw1ng0l3
      @Mw1ng0l3 11 หลายเดือนก่อน

      Thank you for the early reply, I will try to mess around with blueprints until I figure it out@@CobraCode 😁

    • @Novarcharesk
      @Novarcharesk 9 หลายเดือนก่อน

      @@CobraCode So the answer is "sorry you're too dumb to understand me, you can just go and do something else instead of me explaining a simple check."
      Gee, thanks.

  • @studchinese9750
    @studchinese9750 2 ปีที่แล้ว +1

    Can you plz make a tutorial on AI chase and attack the player?

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว +1

      Hey thanks for the suggestion.
      I do have a 2D Ai video planned, but I have a lot of other videos planned that are higher priority, so it'll still be a while.

    • @studchinese9750
      @studchinese9750 2 ปีที่แล้ว

      @@CobraCode I got my AI to roam and chase player but for some reason the AI will start glitching when I tried to set up the attack flipbook.

    • @studchinese9750
      @studchinese9750 2 ปีที่แล้ว

      @@CobraCode Also I have one more question. How to stop my AI enemy from flipping? I tried to set the rotation rate on Z to 0 but it did not work.

    • @studchinese9750
      @studchinese9750 2 ปีที่แล้ว +1

      Nvm I got it fix

  • @easiom4555
    @easiom4555 ปีที่แล้ว

    how do zou add the enemy because im kinda stuck and dont know what to do next?

  • @Tolistan
    @Tolistan 2 ปีที่แล้ว

    jumping,idle and walking/running work but when i press space the hit animation doesnt work

  • @SchwarzeneggerMinecraft
    @SchwarzeneggerMinecraft ปีที่แล้ว

    I Am New To The Whole UE Scene
    I Followed The Steps From 0-47 . But The Animation Will Pause And It Will Either Start The Loop Of The Old One Or (When I Added The Sto Looping) It Will Start The Animations Correctly Without Loop Without The Attack Animation .

    • @kagi852
      @kagi852 ปีที่แล้ว

      thise vid is little old now cause the is better way to make 2d games know there is free tool called paper ZD it help you handl the animation using animatin graph

  • @QingXinXiao-i3k
    @QingXinXiao-i3k ปีที่แล้ว

    Hello Cobra I m in extreme strugle rn.... So I followed everything based on your instructions, but it just failed one I tried to add the 'Do Once' node, I think it might because I came from the 2D side scroller video and there was a few differences from this one. Really appraiciated if you can offer some help.

    • @CobraCode
      @CobraCode  ปีที่แล้ว

      Hey, sorry but not quite sure where exactly you're stuck.
      With DoOnce nodes you need to keep in mind that you generally want to use them out in the event graph and not inside of functions.
      Every time a function is executed completely the DoOnce state will be reset and not saved for the next time the same function is executed.
      To keep state you need to use them in the event graph.

  • @financialfreedom1277
    @financialfreedom1277 3 หลายเดือนก่อน

    You made a combat tutorial for people using Paper 2D characters
    But I am using Paper ZD characters and I can't seem to figure out how to get my Paper ZD to do attacks
    Could you tell us how in the future or have you already made a video for that and I just can't find it?

    • @CobraCode
      @CobraCode  3 หลายเดือนก่อน

      Hey.
      Attacking with PaperZD is actually covered in depth in my courses.
      tinyurl.com/Ultimate2D
      tinyurl.com/Unreal2DTopDown
      The best way of doing it is to drag out a reference of your animation component you get from PaperZD in your character.
      Then get the anim instance and call 'anim override' and select your attack animation.
      You'll still have to create a box collision to use as a hitbox though and then create a PaperZD Anim Notify State and in the start event turn the hitbox on and in the end event turn the hitbox off. Also on beginplay you want to make sure the hitbox is off.
      Then you can simply use the OnBeginOverlap event to apply damage!
      Sorry, might be a bit hard to follow in written form.

  • @MotoboyGameDev
    @MotoboyGameDev 4 หลายเดือนก่อน

    bro iam using unreal 4 2d template and use booleans to controle the current flipbook , and iam try a way to change the animations trought the input , exacly how do you do but doesnt happen , how can i do ? if someone can help me , i would like to set diferens attacks in that input but the booleans block and dont change the current flipbook. thank so much

  • @coldgravy8056
    @coldgravy8056 ปีที่แล้ว

    What should I do if my event tick is already in use for another function?

    • @CobraCode
      @CobraCode  ปีที่แล้ว

      You can use a sequence node and run one after another

  • @thaddeusgigachaddeus2954
    @thaddeusgigachaddeus2954 ปีที่แล้ว

    Can you add multiple attacks like this?

    • @CobraCode
      @CobraCode  ปีที่แล้ว

      Yeah you definitely can, but you'll need to expand it and come up with a system to change the size of the hitbox depending on the move and a way to cleanly differentiate between moves

  • @bernardosardinha
    @bernardosardinha 2 ปีที่แล้ว +1

    One of my first Unreal project (back in 2016 i guess) was to create a beat them up using Double Dragon 2 Nes sprites. I followed the Epic tutorial in Paper 2d and everything was fine until I was about to implement the melee attack.
    Well...I guess is time necromance that project back to life! eheh
    Now that paper zd is free (THANK GOD), will you cover that plugin? It would be awesome!

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว +1

      Haha thanks for sharing that story.
      Yeah I've used Paper ZD before but didn't really wanna cover it since it was paid and I couldn't just expect every viewer to buy it.
      But since it's free now it would make sense to make videos about it!
      I would love to cover it right away but again I usually make these videos weeks or months in advance, so I'm still wrapping up a couple of other things before I'll be able to get to that.

    • @bernardosardinha
      @bernardosardinha 2 ปีที่แล้ว

      @@CobraCode NICE!

  • @OhMyShad
    @OhMyShad 10 หลายเดือนก่อน

    I was wondering how to make destroyable ground in UE5? Since in Unity and Godot is super easy but I can't figure it out in UE

    • @CobraCode
      @CobraCode  10 หลายเดือนก่อน

      Hey, that's something I haven't looked into yet, but it's definitely doable and has been done in the pixel 2D plugin on the marketplace.
      I'd assume a lot of the tile map functionality is probably not exposed to blueprints and you'll have to do some digging through the C++ code to see how you can access the properties.

  • @croppedcrit8812
    @croppedcrit8812 2 ปีที่แล้ว

    Following your previous 2d video, I am trying a solution, please help:
    I am trying to use my InputAction Attack as a condition for a branch after my event tick before run UpdateAnimation. How do I do this?? I cant seem to find a way to reference the inputaction to use as the condition. is this not possible? if so, what should I be doing different. thank you.

  • @pranksclub8850
    @pranksclub8850 ปีที่แล้ว +1

    does this work for ue4 too?

    • @CobraCode
      @CobraCode  ปีที่แล้ว

      Yes. Pretty much nothing about Paper 2D changed.

  • @gabrielionescu9816
    @gabrielionescu9816 ปีที่แล้ว

    With your settings in HitCheck ,I don t know why i kill the enemy from one shoot!

  • @GATXShinGundam
    @GATXShinGundam 2 ปีที่แล้ว

    I am not sure what is the problem but the idle animation keeps restarting as I press button. Any idea what is the problem?

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว +2

      I think your idle animation is probably overriding your attack animation instantly.
      You could search for all instances of 'set flipbook' in your blueprint and attach a print string to them to get a better understanding of where and when your flipbook is being manipulated

  • @walney2008
    @walney2008 19 วันที่ผ่านมา

    Hello, I'm from Brazil, I use a translator, I would like to know today to create a 2D game in Unreal, which version should I have installed? Like fighting games like Mugen, how do I do it? Do you have or can you create tutorials for newbies like me? I don't want to use Unity but Unreal, can you help?

    • @CobraCode
      @CobraCode  19 วันที่ผ่านมา

      It really depends.
      It might be easier to achieve good performance with 4.27 than with 5.5 if you want to strictly stay 2D and don't want to use any of the new features and can live without the quality of life improvements.
      You can probably achieve something similar with 5.5 but will need to spend some time tweaking things.
      You might also want to look at Unreal Fighter 2D since it basically already is what you want to create. A Mugen-like in Unreal Engine.
      www.leonsframeworkshop.com/uf2d-learn-more

    • @walney2008
      @walney2008 19 วันที่ผ่านมา

      Hello! Thank you so much for your response, it was really enlightening! I think I'll test version 4.27 first, since my focus is really on 2D and I want to keep things simpler for now. I'll also check out Unreal Fighter 2D, it seems to be exactly what I need to get started. Thanks for the tip and the link! If you have any other suggestions or advice, I'm all ears. Cheers!

  • @aquacatz23
    @aquacatz23 ปีที่แล้ว +1

    How do I create enemies that are able to get hit by the attack

    • @CobraCode
      @CobraCode  ปีที่แล้ว +1

      When checking for the overlap you need to make sure to cast to a class that also applies to them and they should implement the 'on damage' function which is provided to all actors by unreal engine.
      Alternatively you could also use an interface and then instead of casting when detecting the hit you can check for 'implements interface' and then call the damaged function there.

    • @aquacatz23
      @aquacatz23 ปีที่แล้ว +1

      @@CobraCode Thanks!

    • @Thedarkestnoob442
      @Thedarkestnoob442 ปีที่แล้ว

      @@aquacatz23 did u figure it out, can u help me?

  • @danthebroblox3584
    @danthebroblox3584 2 ปีที่แล้ว

    im havign a problem where the idle animation only works once after any animation, any fixes?

    • @Jareczeek
      @Jareczeek ปีที่แล้ว

      Have you resolved this problem?

  • @sakulv6884
    @sakulv6884 2 ปีที่แล้ว +1

    Hey! Your videos are great! Unfortunately I can't set up this system with Paper ZD, which makes the rest of the work much easier... Except that-
    Could you give me a solution, or make a tuto please?

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว +1

      Thanks!
      Yeah you'll probably need to change things around with paper ZD a bit.
      I do plan on also making Paper ZD tutorials, but it'll still take a while.

    • @sakulv6884
      @sakulv6884 2 ปีที่แล้ว

      Ok, thank you ! I love your videos, you are the only who do what i need lol
      I wish you can share tutorials about Paper ZD one day, good luck !
      I think i have found the problem : my box collision set on overlap pawn dont detect the PaperZDCharacter class, but when i delete the "non equal to self" its deal damage to my player and nothing to the ennemy"

    • @sakulv6884
      @sakulv6884 2 ปีที่แล้ว +1

      @@CobraCode and another thing, are you going to do a tutorial about local multiplayer, for example ? You have a lot of possibility with the 2d-3d hybrid ! Good luck !!

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว

      @@sakulv6884 Thank you. Yeah I do have plans to cover local multiplayer. I made many games with split screen or non-split screen multiplayer in the past, so it's a topic I really want to cover.

    • @sakulv6884
      @sakulv6884 2 ปีที่แล้ว +1

      @@CobraCode Oh nice ! My idea was to do a non-split local multiplayer like Smasg Bros, so your videos are very helpful !
      Oh, and i have found a solution for the melee xD
      Thank you and good luck !

  • @llRDXll
    @llRDXll 2 หลายเดือนก่อน

    and how to create the event for the space bar is what am trying to figure out

    • @CobraCode
      @CobraCode  2 หลายเดือนก่อน +1

      You can just right click in the event graph and search for space bar and it should show up!
      The proper way of doing things nowadays is to use the enhanced input actions though and you should be able to find plenty of guides looking that up.

    • @llRDXll
      @llRDXll 2 หลายเดือนก่อน

      @CobraCode thanks for the input I been looking for hours for a guide for how to make a 2d character attack and I didn't find any good ones so that's a good video idea if U were looking for any!

  • @gatfromber
    @gatfromber 2 ปีที่แล้ว +2

    is there a way to make a combo?

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว +1

      Yes, but making combos is actually quite complicated.
      This isn't a tutorial but I made a dev log talking about it conceptually which might steer you in the right direction:
      th-cam.com/video/aFIs2V5eqOg/w-d-xo.html

    • @gatfromber
      @gatfromber 2 ปีที่แล้ว +1

      @@CobraCode i will check it out, thanks mate

  • @ssneakyandfriends1626
    @ssneakyandfriends1626 ปีที่แล้ว

    the attacks don't seem to be able to do any damage to anything.

  • @samuellabrie1726
    @samuellabrie1726 2 ปีที่แล้ว +1

    Quick question, do some one know how to make the hitbox change with the flipbook? I'm making a top down and need my hitbox to change with the flipbook, Right now I can hit target all around my character but I would like to only hit target in front of my flipbook. (P.S. I'm new but know a lot about coding so I just need a push in the good direction)

    • @CobraCode
      @CobraCode  2 ปีที่แล้ว

      Hey, sorry for the late reply. Had a lot going on these days.
      Unreal Engine doesn't really come with anything to make this easy for you in 2D.
      You'd basically have to check on Tick which flipbook you are currently playing and if you are on a certain frame that you want to use as a flag to trigger the switching of the hitbox. This totally works and gives you full control, but you'd have to come up with your own way of implementing this cleanly.
      But if you're using paper ZD which is a plugin that recently became free for everyone it comes with the ability to create animation notifies just like you would in 3d games. You could then create a notify to switch your hitbox on a certain frame for a certain animation!