how to create dash with effect - Learn Godot 4 2D - no talking

In this video I show you how to add a dash and create a simple dash animation in godot.
If you liked the video and are interested in more don't forget to subscribe.
And If you would like a video about a game mechanic, leave a comment about it
💎 Assets
TileSet: pixelfrog-assets.itch.io/pixe...
Player Sprite: free-game-assets.itch.io/free...
Cat Sprite: ikoiku.itch.io/16-x-16-pixel-...
🎵 Music credits
"Ancient Winds" from Kevin MacLeod
❤️ Support the Channel
Ko-Fi: ko-fi.com/devdrache
🎬 Video Chapters
0:00 - What you can expect & Setup Timer
0:30 - Code for dash and dash effect
3:28 - Result
☠️ Difficulty Levels
Beginner: Very few and simple code - For everyone
Beginner 2: More code but still quite simple
Advanced: Basiscs must be in place, simple code is over
Advanced 2: now things are getting wild :)

Пікірлер: 15

  • @LucasPereira-pu6cq
    @LucasPereira-pu6cq28 күн бұрын

    Thanks. Great tutorial

  • @AliceMadTeaParty
    @AliceMadTeaPartyАй бұрын

    Your tutorials are what keeps me going with godot, thanks mate!

  • @DevDrache

    @DevDrache

    Ай бұрын

    i am glad to be of help 😊

  • @1247theGreatest
    @1247theGreatestАй бұрын

    This is really good! Thanks for the tip!

  • @rush_boi
    @rush_boiАй бұрын

    Your channel is the reason why I'm still working on my game 😊 fantastic work and video 👍

  • @DevDrache

    @DevDrache

    Ай бұрын

    thank you, i am glad to be of help

  • @user-jx1ke4ek1g
    @user-jx1ke4ek1g12 күн бұрын

    excellent tutorial, how do I make it so that it is activated only 1 time for each jump, because like this, you can go around the map only using dash, it is infinite

  • @DevDrache

    @DevDrache

    12 күн бұрын

    You have to add a dash counter that resets when you want it to. It would be easiest if the dash is only possible in the air and the counter resets as soon as the player touches the ground Something like this: var dashCounter = 0 ... func _physics_process(): ... #rewrite dash activation if Input.is_action_just_pressed("attack") && not is_on_floor() && dashCounter dashCounter = 1 ... if is_on_floor(): dashCounter = 0

  • @user-jx1ke4ek1g

    @user-jx1ke4ek1g

    11 күн бұрын

    @@DevDrache Thank you for your response, it helped me a lot, yes a correction "if Input.is_action_just_pressed("attack") && not is_on_floor() && dashCounter < 1:" must be less than 1 dashCounter. works perfect using your idea

  • @Flamebamboo
    @FlamebambooАй бұрын

    For some reason my dash effects goes below the player

  • @DevDrache

    @DevDrache

    Ай бұрын

    Could it be that your sprite node is not at position (0,0)? The dash effect gets the position from the character body node.

  • @user-ti9ec9gm4l
    @user-ti9ec9gm4lАй бұрын

    Please can you make a video about how to make an enemy jump when they see you I need a video about it so badly 😢

  • @Dunkable

    @Dunkable

    Ай бұрын

    I'm still new but couldn't you put a RayCast on your enemy and make them jump when the player enters the RayCast?

  • @DevDrache

    @DevDrache

    Ай бұрын

    sure, I'll put it on the list. do you need it with line of sight (LOS) or without? Maybe I can help you with a few explanations until the video arrives: Give the enemy an area node which then checks whether the player enters the area. Then you can use the size of the area node to determine when the opponent sees the player. if you need LOS check, then you have to work with raycasts and the player position.

  • @DevDrache

    @DevDrache

    Ай бұрын

    @Dunkable works, but has a few problems. with a static raycast: if the player comes from above or behind, the enemy will not react. it is also not 100% of the same direction. with a flexible raycast (search at the player position): you have an automatic line of sight (LOS) check. Here it depends on whether you want this or not.