2D Platformer Attacks and Enemy Setup ~ Godot 4 Tutorial

  Рет қаралды 105,164

Chris' Tutorials

Chris' Tutorials

Күн бұрын

Пікірлер: 165
@Psydefex
@Psydefex 10 ай бұрын
cant express enough how grateful i am for you taking the time to make these tutorials brother. i have 0 programming knowledge and was able to get enough from these to mess around and make some cool shit.
@OHMSdev
@OHMSdev Жыл бұрын
took me about 2 weeks to finish this course in my free time. Im grateful for the work you've put into this. I hope to see more done on your channel with godot4!
@kuangmengg
@kuangmengg 11 ай бұрын
I love how thie video begins by explaining what are we going to expect follows by some of the basic mechanics instead of many tutorials straight jump into the editor and coding to leave the viewers wonder if those tutorials are what they need. As a complete godot beginning, it definitely give me a good guide
@NicholasKJ
@NicholasKJ Жыл бұрын
This course is incredible! So well structured and clearly explained. For damaging the enemy, instead of creating the Damageable class and looping through all of the body's children to find if the body has that class, I like to use `body.has_method("take_damage")` and implement a method take_damage(damage : float) in any character I want to be 'damageable'. Much more performant than looping through the children of every body you collide with. Thanks for the course! :)
@khzzzzzzzz
@khzzzzzzzz Жыл бұрын
Please keep uploading this longs videos! I'll watch in detail!
@CosimoDavideViggiano
@CosimoDavideViggiano Жыл бұрын
What I love about your tutorials is the fact that you show how to resolve my same issues (chain attack, multiple sprite sheet for animations, sprite offset, state machine etc). I really appreciate it. Other tutorials are somehow done ad hoc with their assets, your is most realistic ever. Thank you.
@davidank07
@davidank07 Жыл бұрын
FYI if you ever have to change the name of a variable, if you highlight it and hit ctrl R (cmd R on Mac I guess) it'll give you a prompt to set the new variable name and replace all so you don't have to go searching for it.
@gamma3501
@gamma3501 Жыл бұрын
thx I thought it wasn't cause they forgot to add it on right-click menu
@richardsymes8473
@richardsymes8473 Жыл бұрын
with reference to the flipping of the sword collision shape, a much simpler solution is to add this code to the update_facing_direction function func update_facing_direction(): if direction.x > 0: sprite.flip_h = false if sign( collision_shape_2d.position.x) == -1: collision_shape_2d.position.x *= -1 elif direction.x < 0: sprite.flip_h = true if sign( collision_shape_2d.position.x) == 1: collision_shape_2d.position.x *= -1
@Ceseleone
@Ceseleone Жыл бұрын
hmm why not just change X position in the same code when you flip the player sprite?
@raoinshishiza152
@raoinshishiza152 Жыл бұрын
oooh, lucky me, i just finished your other tutorials and was looking for a attack and enemy setup
@daniel5694
@daniel5694 Жыл бұрын
these tutorials are amazing! I just started working with my first game engine and started with these tutorial series, I'm learning so much, thank you so much for all the work you do.
@pascalcasier959
@pascalcasier959 Жыл бұрын
Thank you so much for continuing this tutorials
@WeirdGoat
@WeirdGoat Жыл бұрын
Great work! Really recommend you to make a HitBox & HurtBox scene, so that you could use them in almost everyone of your game with just a little modification
@Jestertdye
@Jestertdye Жыл бұрын
These tutorials are so great! All other ones that I try and watch are in a previous version of Godot. You’re awesome!!!
@corecore1572
@corecore1572 Жыл бұрын
Exactly! The software is updating so fast that previous tutorials are almost useless now. They follow the same principles, but to a beginner it's quite confusing.
@lenonkitchens7727
@lenonkitchens7727 9 ай бұрын
If you go through the trouble to set up a state machine, each state should handle playing it's own animation in it's on_enter() function. That way you only have to set up the next state, and never have to remember to call travel() to change the animation as well.
@malcolmcolindixon
@malcolmcolindixon Жыл бұрын
Don't get me wrong I've learned lots from this video and the previous one BUT I really feel liked you messed up use of the state machine, like playing animations for the next state when these obviously should have been in the on_enter for the next state. Jump logic in the Ground state where there should be a Jump state IMO. Just like you did the state_input and state_process I added an on_animation_finished too, which was useful in the Attack state and Dead state which helped to simplify the code. Adding a previous state parameter to the on_enter method was really useful too for the Attack, InAir and Hit states.
@PopMusicKiller
@PopMusicKiller 8 ай бұрын
I agree. This stopped making sense when I found myself switching between scripts every few seconds to troubleshoot implementing a climb state.
@acidjuice
@acidjuice Жыл бұрын
These videos are honestly so helpful for learning about godot!!!
@noiJadisCailleach
@noiJadisCailleach Жыл бұрын
55:20 Except, we don't get the death animation. The snail turns immortal instead. Update: If you have the same problem, it was a node naming and calling discrepancy. I straightened that out and it worked. I had 2 other typo related problems that gave me errors after this timestamp. Fixing all of those got me to the end of the vid, following along. I followed along with Godot ver. 4.0.2. Best of luck to everyone else!
@lew-tn8yd
@lew-tn8yd Жыл бұрын
Hi Noi :) I´m having this same issue, which node is causing you problems?
@vasiliykorn4485
@vasiliykorn4485 Жыл бұрын
I have had the same issue. First of all don't forget to assign right Nodes in right places and yeah ... be careful with variables naming. I did mistake in signal name (made it like function for another node) it's caused a lot of problems) Get luck!)
@Skidmaster180
@Skidmaster180 9 ай бұрын
I cannot thank you enough! The whole flipping hitboxes thing was driving me mad.
@bswordsman4320
@bswordsman4320 Ай бұрын
Good tutorial! Thank you for the info.
@johnjacklynch
@johnjacklynch 11 ай бұрын
I've been trying to implement aerial attacks using this logic but whenever I attack in the air, it locks me in the attack state. How do I fix this?
@MH-lr6ue
@MH-lr6ue 7 ай бұрын
This is exactly what i needed lol. Thank you
@LOGOASSASSIN
@LOGOASSASSIN Жыл бұрын
Congratulations on 100k !
@ChrisTutorialsYT
@ChrisTutorialsYT Жыл бұрын
Thanks mate :)
@LOGOASSASSIN
@LOGOASSASSIN Жыл бұрын
@@ChrisTutorialsYT You deserve it.
@atif-sz9qp
@atif-sz9qp 11 ай бұрын
Thank you for your tutorial I do love it, but I facing a problem where copy of my snail do not apply the knockback effect (the knockback effect only apply to the first snail). Can you help me
@adrianpassarelli4511
@adrianpassarelli4511 3 ай бұрын
didi you solve it? mine only works on the first hit of the first mob, then no more knockback again
@ajcar110ify
@ajcar110ify Жыл бұрын
Great idea with how you handle translating the position of the hitboxes. i had been using one for each side and activating or deactivating them depending on the direction the character was facing. this is much better.
@WalkerRileyMC
@WalkerRileyMC Жыл бұрын
The method I used was to add an @onready variable to the sword collision shape right in the player script, then under the existing update_facing_direction method I manually repositioned the collider using collision.position = Vector2 (x,y) for right and (-x,y) for left, with y not changing its value. I'm sure that'll bite me eventually, but it seems to work fine and doesn't require additional scripts and signals. I guess if I ever wanted to adjust the collider i'd have to manually update it....hrm..
@HansChristian-bj2pt
@HansChristian-bj2pt Жыл бұрын
Awsome tutorial, an option for the change of combo attack animations is to use the animator. This can be good if your attack animations have a recovery animation included that you ither want to skip or make it so you cant combo when the recovery starts. Ofc some change to the code is also needed if you go this route, if anyone wants to try it you have to split the functionality in the animation_finished function and create another function, mine was named Combo and also a bool that is Exported so the Animator can set the bool, this is used instead of a timer so you can get rid of that one. Then the Animation Finised function only handles the Next_State if the animation have finished and only returns to the return state. The Combo function is activated when you press the attack button while the canCombo bool is true (that gets set in the animation keyframes) and it checks for what node is currently active. As an example it attack_1 is active the attack function would call playback.Start(attack_2).
@hbora8339
@hbora8339 Жыл бұрын
Hey mate, these tutorials are fantastic. I've been following you all the way and i've learned a ton, so massive thank you. The pace is difficult to keep up with though! I know you've got a lot to get through, but spare some thought for me in the next one xD
@alexandern9353
@alexandern9353 Жыл бұрын
I'd expect all the state machine stuff to actually help write correct animation transition code. But in the end it's just a mess of configuration properties, inherited properties, string properties, "playback" of arbitrary strings, etc. No actual constraints. And why is there an on_enter() defined at all? "State machine" more like rube goldberg machine.
@strathallanguy
@strathallanguy Жыл бұрын
I enjoyed the speedy snail bug 😁
@AzoTheRed
@AzoTheRed Жыл бұрын
These videos have been awesome, but I have one thing to mention. I have decided to put the animation call into the on_enter() function. To me, it feels like it makes more sense that way. I don't know if that is going to cause me issues in the future, but we will see.
@Coruja182
@Coruja182 Жыл бұрын
I agree
@guiltfn844
@guiltfn844 Жыл бұрын
LETS GOOOOOOO CHRIS
@dzmitrypadrig4037
@dzmitrypadrig4037 Жыл бұрын
You really know how to make this approachable. Good job!
@Ceseleone
@Ceseleone Жыл бұрын
how can I add the attack while jumping? only attacking on the ground cancels the option of any flying enemies
@tenorsrfun
@tenorsrfun Жыл бұрын
Great tutorials, been following along to learn Godot. Is there a reusable way to do the animations? It seems tedious to have to add the texture, hframe, and frame every time on the animation player per animation. Is there way save that shape and reuse it for additional animations? Essentially for each animation to extend some class I create that has those 3 properties?
@raoinshishiza152
@raoinshishiza152 Жыл бұрын
what happened to the hitstate code at 50:55? it went from exporting a var to connect the state machine to not having one?
@noiJadisCailleach
@noiJadisCailleach Жыл бұрын
At this part of the vid, this is actually the third time this has happened. Don't bother waiting for replies. I feel that he's actually posting these vids mostly for himself, so he could review it later when he's forgot something. And we, the audience, are just bystanders who happen to see his shit.
@SosumiInc
@SosumiInc Жыл бұрын
@@noiJadisCailleach This isn't his fault. You messed up.
@noiJadisCailleach
@noiJadisCailleach Жыл бұрын
@@SosumiInc You talking about? LMAO. I'm thinking you weren't even trying to read context here. Get your shit together.
@zillionxil9095
@zillionxil9095 5 ай бұрын
Do you have any tips on how to go about making multiple types of enemies "Damageable"? Say if you had a mega snail and a poison snail, would you just give them the same "Damageable" Node2D?
@JinDaifer
@JinDaifer Жыл бұрын
I just watched 13 minutes of video and you help me a lot.
@itsthefortniteguy
@itsthefortniteguy Жыл бұрын
I have a problem, the snail doesnt play the walk or dead animation, i already checked if the code was the same as the video Edit: It also continues moving after being hit Edit 2: It has no knockback
@QuestKnightTV
@QuestKnightTV 8 ай бұрын
Can we get a follow-up tutorial on how to improve the enemy? Change direction instead of falling off platforms and attack player?
@michaelwaldsmith495
@michaelwaldsmith495 4 күн бұрын
Following along with the downloadable project file. Whenever I open the animation player and hover my mouse over the "frame" track, it instantly changes all the frames to the "Idle" animation. This might be a bug from updating the project from Godot 4 to 4.3. Any suggestions to fix? I'm trying to replace the sprite animations with my own sprites.
@RafaMartinelli
@RafaMartinelli Жыл бұрын
Brilliant, I followed all the tutorials and after troubleshooting a couple hiccups I was able to complete it. I only had 1 small issue with enemy knockback: the original enemy gets standard knockback but the duplicates get a very tiny knockback. Any ideas on what might be causing this issue? 🤔
@carkelvisar4821
@carkelvisar4821 8 ай бұрын
I also have this problem, and don't know how to fix it :( EDIT: Never mind , somebody in the comments said to detach and re-attach the script with right click on the duplicate snails and it worked :)
@RafaMartinelli
@RafaMartinelli 8 ай бұрын
@@carkelvisar4821 thanks for the heads up I'll have to go back and try it out!
@jasonsefcik9665
@jasonsefcik9665 2 ай бұрын
@@carkelvisar4821 Thank you, I had this same issue and clearing and reloading the script in the inspector worked for me. Seems like a glitch with Godot.
@kyrxsi
@kyrxsi 8 ай бұрын
@ChrisTutorialsYT , why i have knockback problem with some enemies, only one can be knockbacked up?
@skeletalhero
@skeletalhero Жыл бұрын
these are crazy good. im working on a 3d game but so far these tutorials has been making a ton of stuff click for me.
@dilkyliyanage2956
@dilkyliyanage2956 Жыл бұрын
In Hit Knockback on Sword Hit, the snail doesn't return back to walking. Please help 🙏
@nikolaklobucar7981
@nikolaklobucar7981 2 ай бұрын
On 9:33, why did you change names from attack_animation to attack_node? Is there some convenction that I missed?
@Ears1020
@Ears1020 2 ай бұрын
I am at a complete loss. I have been through the code several times and for some reason, my character gets stuck in the "attack" state (~16:10). In the video his animation is stuck, but the State shows that it has returned to the "ground" state, but I am stuck in the actual "attack" state (based on the debug label) and I can not find where I made an error or what I missed. Everything looks identical to his code but it is not working.
@jonathanbernardi4306
@jonathanbernardi4306 Жыл бұрын
Amazing journey this series, lot of knowledge and the logic behind the commands, this been priceless. For the sprites not having the same position, I fixed mine by adding a keyframe to position and adjusting each animation accordingly, not sure if that´s a correct way, however been working good so far.
@HamsterAccent
@HamsterAccent Жыл бұрын
01:16:24 Has anyone else had luck being able to implement character damage like he suggested? I added a damageable to the player, added the hit and dead states to the player's state machine, added the death animation, and added a hitbox to the snails (using code that's basically copied from the sword while adding a bit that only hits the player), but I haven't gotten it to work yet. I feel like I should just be able to copy the nodes and add all the necessary things, but that doesn't appear to be the case. Anyone able to help? Please and thank you! EDIT: Nevermind, I realized that I hadn't connected the hitbox to the body entered signal. It works now!
@AxZelAnimations30
@AxZelAnimations30 Жыл бұрын
This is similarly what I used to do in Unity. Except some of the scripts that needed Timer are basically done in the AnimationPlayer itself. I guess Timer is alot more useful when you're in a game where Damage Per Seconds are important. But I have not seen anyone do a Root Motion in 2D. I know it can be done without actually using Root Motion feature, just the AnimationPlayer and a Node as the Root Motion, but I'm still planning on how it should be done.
@horohoro1836
@horohoro1836 Жыл бұрын
Thanks for the tutorial :DD
@articrus9418
@articrus9418 Жыл бұрын
Have I been the only struggling with 1:00:27 ? I put the check_if_can_move method in but it doesn’t seem to work in stopping the snail when it gets hurt. Nor does it seem to ever register as false when it gets hit, despite the hit state saying it should Edit: Nevermind lol. Just had to re-position one line and it worked perfectly
@PebroGon
@PebroGon 6 ай бұрын
Hey, I applied the "damage indicator" from this tutorial on the enemy in my game, but when it gets hit , the damage gets indicated in one spot on the tile of my game, not on the enemy itself. How to fix it please?
@APRI_Music
@APRI_Music 2 ай бұрын
Hey, when I attack the snail after adding the collision for the right side, the knockback on the snail only moves left after being hit?
@HQ_Default
@HQ_Default Жыл бұрын
Since the "damageable" node is only there to provide confirmation of a "hit" function, is there any reason to specifically use a node instead of creating a generalized parent enemy script that the snail would inherit?
@buttertaco8819
@buttertaco8819 Жыл бұрын
Can you show how to do a doge roll in the next video? I'm trying to figure it out but i keep running into issues
@houmengzambrano386
@houmengzambrano386 5 ай бұрын
Hi, how would you handle that player taking damage in different states ?
@gachareeguyrandomstuffgrrs3020
@gachareeguyrandomstuffgrrs3020 24 күн бұрын
1:04:24 I have a problem with that on func on_enter(): timer.start The start became a null value And can't call How to fix it?
@adrianpassarelli4511
@adrianpassarelli4511 3 ай бұрын
donde this tutorial from scratch 3 times already, and my knockback only wotks the first time, checked all values, all is ok, what else could be happening?
@YetAnotherMichael89
@YetAnotherMichael89 3 ай бұрын
Anyone know how to trigger the enemy attack animation when the enemy's attack collider collides with the player? I can only get the animation to play when F is pressed like the player's attack
@khile5568
@khile5568 11 ай бұрын
at 23:40, it seems that the two shapes are not colliding. any suggestiosn?
@markuseaves4074
@markuseaves4074 9 ай бұрын
im stuck at the same spot. i even tried changing the ordering but i probably messed that up too lol
@otterxfun6144
@otterxfun6144 Жыл бұрын
Thank you! Please, make more Tutorials for Godot 4! You are the best!!! 😇
@Vemithespaceman
@Vemithespaceman 4 ай бұрын
hey kris are you able to do a tutorial where enemies attack you and you take damage.
@coolguy230
@coolguy230 9 ай бұрын
hey i got a problem with that he had in the video in 01:09:08 - Flipping Sword Hitbox Position Left / Right he fixed it by conecting the area to the player but for me it doesnt work it still says can connec on a null value
@coolguy230
@coolguy230 9 ай бұрын
how to do the enemy without animation tree but just animation player
@toxicbird.official
@toxicbird.official Жыл бұрын
Hello i have an unrelated question, by what app i can record my voice to use in unity project which is playable on mobile devices after build?
@chinmaythaokar3560
@chinmaythaokar3560 6 күн бұрын
thanks man
@NepThach
@NepThach Ай бұрын
I am like at around @18:00 if you keep pressing attack lots of time the machine will soon break to not move. Do you guys have that?
@Ceseleone
@Ceseleone Жыл бұрын
I have attack1 and attack2 animations with 4 frames too, timer in 0'3s. But it's impossible to chain the double attack for me. It's something related with my attack button speed press?
@SosumiInc
@SosumiInc Жыл бұрын
1:01:00 I had to remove the type on "var direction" in order to make it not complain about "Invalid operands Vector2 and bool for 'and' operator". Godot 4.0.2 in Linux For some reason, it didn't want to check whether or not 'direction' was nonzero. I'm sure I did something wrong, as on_enter() isn't working in any class, either. Another (waaaaay simpler, IMO) way of handling the sword collision flipping left/right is to modify the player's "update_facing_direction()" script to have "$Sword.scale = Vector2(-1,1)" when facing left, and Vector2(1,1) when facing right (naturally, make an @onready for $Sword and change accordingly).
@noiJadisCailleach
@noiJadisCailleach Жыл бұрын
Nah, you messed up. Now you're trying to get smart when it's clearly a skill issue. And it's all his fault as well, of course.
@SosumiInc
@SosumiInc Жыл бұрын
​@@noiJadisCailleach I had the aforementioned behavior confirmed as being divergent between 4.0.1 and 4.0.2 by devs on IRC. Not sure why you're so hostile.
@Ceseleone
@Ceseleone Жыл бұрын
I made this but only changing position.x for the collision shape of the sword
@coolguy230
@coolguy230 8 ай бұрын
can you explain it more thanks
@seancudit2020
@seancudit2020 9 ай бұрын
why do you use Sprite2D and not AnimatedSprite2D ive gotten most of the way done with my character but up until now I thought you had to use AnimatedSprite2D or does it not matter?
@omegilla7864
@omegilla7864 9 ай бұрын
Where an what is the playback var? i dont see it anywhere.
@ReversedShadows
@ReversedShadows Жыл бұрын
So when my enemy damage numbers pop-up, they aren't originating from the snail's y-coordinate location. Instead they're appearing well above it, like barely in the top of the screen. It does appear above the snail regardless of its x-coordinate (as it moves to the left). I would assume the issue would likely be within the health_changed_manager here: func on_signal_health_changed(node : Node, amount_changed : int): var label_instance : Label = health_changed_label.instantiate() node.add_child(label_instance) label_instance.text = str(amount_changed) Since that's calling back to the "Snail", right? But I can't see any reason why it isn't functioning the same way since there isn't any y values in that script nor any available/changed in the inspector.
@matthewmatteomatheus6483
@matthewmatteomatheus6483 4 ай бұрын
Reset all the anchor points in the inspector. Go into HealthChangedLabel, click on the label, in the inspector tab, open the Layout panel and reset all Anchor Points and Offsets.
@Crisisdarkness
@Crisisdarkness Жыл бұрын
Wow I didn't know your channel, this looks great, I would like you to continue adding more features to this genre, recreate the essentials that exist in this genre, more variety of enemies, do damage from a distance, be able to dodge, add a boss, how to define a little map. Thank you for your wonderful content, I have subscribed
@dhaneshvaghasiya8947
@dhaneshvaghasiya8947 5 ай бұрын
at 24:34 i have the same setup for hitbox but for enemy i have used area2d and it's working it just don't detect th collision with the sword
@NotTheGod1
@NotTheGod1 Жыл бұрын
Thanks 😊. Make one on how to export also plz when u finish the tutorial
@devon674
@devon674 Жыл бұрын
it may just be that I'm going insane, a very real possibility, but I think at around the nine minute mark you're repeating the exact same steps you just outlined at the eight minute mark??
@HansOilaf
@HansOilaf Жыл бұрын
yes don't worry you are going insane. do your duplicate snails have knockback?
@ittipornpoosri9200
@ittipornpoosri9200 Жыл бұрын
hey guys i have trouble in case with knockback i already did the same ( code ) like video and why enemy it actully knockback left/right why enemy it only knockback left ? can some one pls help
@bilal-lb5fn
@bilal-lb5fn 3 ай бұрын
how to make the enemy hit the player and damage it
@HamRL1
@HamRL1 Жыл бұрын
Thanks a lot for these videos, they helped for me to take the leap and learn godot! Quick question, how would you "clone" the snail enemy into lets say a slime enemy, to use all the node structure we already created but modify the name, sprite, etc?
@jseebohm2
@jseebohm2 Жыл бұрын
How complicated would it be to make a 2d platformer thats turnbased?
@LOGOASSASSIN
@LOGOASSASSIN Жыл бұрын
Awesome:) Can you show how to do a wipe within a shape? IE you see a rainbow full frame, it wipes from bottom left to bottom right on a central axsis point, ie at a right angle to the stripes? Either to reveal it or visa versa.
@ChrisTutorialsYT
@ChrisTutorialsYT Жыл бұрын
May be busy in the next week here but I added it to my video idea list.
@LOGOASSASSIN
@LOGOASSASSIN Жыл бұрын
@@ChrisTutorialsYT THANKS for replying:)
@zero102321
@zero102321 Жыл бұрын
when I knock back enemy freez and not move anymore. Can someone help me to solve this. Thank
@bilal-lb5fn
@bilal-lb5fn 3 ай бұрын
check if can move
@seanmcintyre9136
@seanmcintyre9136 Жыл бұрын
Following this to a T and the label is not working at all. I tried using breakpoints on it to see what was going wrong but this didn't even trigger. Can't for the life of me figure out what is going wrong =|
@TheRealKaiProton
@TheRealKaiProton Жыл бұрын
Monitoring on and off is interesting, Ive often used the collision shape being disabled and enabled, do you know if there is a difference in monitoring to disabling ?
@jorissommerhalder6030
@jorissommerhalder6030 Жыл бұрын
i dont know what happend i can obsolutly not get the double attack to work but your tuto is insanly good love your work
@neilwalker4277
@neilwalker4277 Жыл бұрын
Superb series. Couple of things and one coding suggestion, maybe you've done them in later videos... You can drag nodes into editor to create unready vars. Gdscript has ternary statement. Gdscript has an idle/frame skip function, to save on that timer waiting a frame. Using get_parent() is a bad thing generally, it adds tight coupling and stops you testing in isolation. Also, if nodes change position, code fails. For your Damagable maybe look at HeartBeast hit/hurt box video. One last thing on Damageable, you fix/set damage value in the node, would be better for hitter node to send damage amount or a damage scale factor, e.g. Sword, gun, etc
@raoinshishiza152
@raoinshishiza152 Жыл бұрын
anybody else stuck at about an 1:00:50? I get an error with check_if_can_move (its in base null instance on null instance) for the snail. I think its because the snail and character state cant talk to each other but i dont know why.
@itsaboy213
@itsaboy213 Жыл бұрын
i got a similar error and if I go into the character state machine script the function was named check_can_move()
@noiJadisCailleach
@noiJadisCailleach Жыл бұрын
Before that, how did you guys get past 55:20? My snail just never dies since i removed queue_free()
@SosumiInc
@SosumiInc Жыл бұрын
@@noiJadisCailleach You forgot to add the stuff he told you to add right before he deleted queue_free()
@noiJadisCailleach
@noiJadisCailleach Жыл бұрын
@@SosumiInc I figured it out. There was a discrepancy between my node names. The default value for dead_animation_node was "dead" While the animation node's name was "death"
@noiJadisCailleach
@noiJadisCailleach Жыл бұрын
Try checking for typos. : for = or func names or something else between the scripts. It's fixed most of my issues from following along.
@itsaboy213
@itsaboy213 Жыл бұрын
1:14:30 I have an issue where when I duplicate enemies the attack animations I used for them only run on the original enemy. Everything else is fine, IE all other animations work fine, hit animations, walking etc. They are programmed to detect and follow the player and one thing I notice is that the original and duplicate are chasing the player and the duplicate gets inside attack range the original will then play the attack animation even if outside the range itself. Any ideas what to do here?
@HansOilaf
@HansOilaf Жыл бұрын
did you fix this maybe? i have the problem, that only the original snail has the knockback, the duplicates don't :(
@itsaboy213
@itsaboy213 Жыл бұрын
@HansOilaf yea if I remember correctly the issue was copy/pasting the enemies instead of extending each one from basically a template into individual enemy instances.
@HansOilaf
@HansOilaf Жыл бұрын
@@itsaboy213 hm weird as it works for him in the video
@lew-tn8yd
@lew-tn8yd Жыл бұрын
Amazing tutorials! But I´m having one issue, when I write the code for the Attack State Logic (00:10:23 - Attack State Logic), the variables don´t show in the inspector. Anyone knows how to solve it? I´ve tried everything I saw on the internet.
@lew-tn8yd
@lew-tn8yd Жыл бұрын
Solved
@TheRealKaiProton
@TheRealKaiProton Жыл бұрын
@@lew-tn8yd Mines been doing that, how did you solve it, for mine, sometimes saving the scripts allow it to update in the inspector
@wash99
@wash99 Жыл бұрын
OKAY QE NEED MORE
@Mdsajidahsanseyamstudent
@Mdsajidahsanseyamstudent 2 ай бұрын
Please make a Combet part of this next Video, so that the enemies can damage tge character
@Nidaro
@Nidaro Жыл бұрын
exelente..!
@LukasLemmer
@LukasLemmer 6 ай бұрын
Anyone know how to give the player damage when colliding with an enemy?
@SunS4nd
@SunS4nd 6 ай бұрын
I'm new so idk if this will help but you probably need to make a function to do it
@DSB2005
@DSB2005 Жыл бұрын
Great
@r0maa375
@r0maa375 11 ай бұрын
can someone help me pleaseeee. im follow tutorial but have some error from 1:14:00. I did what you say, but error keep exist...and i not understand. have someone this problem too?
@bigassmf1923
@bigassmf1923 7 ай бұрын
For anyone else still following this tutorial and having an error here. The fix for me was that in my sword node inspector the monitoring was off so make sure to check that.
@BOLZAKMARTYN
@BOLZAKMARTYN Жыл бұрын
waiting new tutorial )
@kyrxsi
@kyrxsi 9 ай бұрын
1:04:57 what if breakpoint doesn't occurs?
@kyrxsi
@kyrxsi 9 ай бұрын
it start when i start game
@kyrxsi
@kyrxsi 9 ай бұрын
i fix everything
@bryansalguero9441
@bryansalguero9441 Жыл бұрын
To make character movement i need many drawings of same Sprite ?
@coolguy230
@coolguy230 9 ай бұрын
yes
@PunCala
@PunCala Жыл бұрын
Just wtf. I got all the way to the end of the tutorial, I even got the damage texts and knockback directions to work, but then when I copy pasted the snail, only the first snail takes knockback. :DDfafsafönanfslsafasfa Makes me want to cry.
@GENVOKE-gj4rv
@GENVOKE-gj4rv Жыл бұрын
Re-attaching the script on the duplicate snails fixed it for me. Right-click snail2 -> detach script -> attach.
@azure_aSir
@azure_aSir Жыл бұрын
You have no clue the time I've spent on this. TY so much
@sonatafx
@sonatafx 11 ай бұрын
@@GENVOKE-gj4rv thank you so much dude
@rickypeters_
@rickypeters_ 11 ай бұрын
this worked for me as well @GENVOKE-gj4rv . Yet when I decrease damage to "1" to allow for more than 2 hits, the knockback does not trigger a second time. Troubleshooting in the meantime and will report back....
@GENVOKE-gj4rv
@GENVOKE-gj4rv 11 ай бұрын
Just tried it and there's no pushback limit. So at the very least following this video should get you that outcome. @@rickypeters_
@simonhulme7045
@simonhulme7045 Жыл бұрын
Anybody else getting stuck on the attack state after a double attack? My return state is set to ground state and I'm setting the next_state to return_state after playing the attack 2 animation.
@frostlight1222
@frostlight1222 Жыл бұрын
I had a similar issue. Double check your animation names and state names for any caps/typos. worst case is comment everything out and retype it word for word. It sucks but this worked for me.
@eugeneseguiban9863
@eugeneseguiban9863 Жыл бұрын
@@frostlight1222 same
@eugeneseguiban9863
@eugeneseguiban9863 Жыл бұрын
@@frostlight1222 ow nevermind i solved it my bad i use double equal
@AswinBeHera
@AswinBeHera Жыл бұрын
Whoa. I had the same exact error. @@eugeneseguiban9863
@satyrsauce3593
@satyrsauce3593 10 ай бұрын
@@eugeneseguiban9863 Thank you for this, I was having the same problem.
@ulissescorreia1999
@ulissescorreia1999 Жыл бұрын
please help. Error: Can't run project: no main scene defined in the project.
Fade Out, Fade In & Scene Switching Tutorial ~ Godot 4 for Beginners
20:36
The Minecraft Movie memes are way too good.
8:10
Phoenix SC
Рет қаралды 1,2 МЛН
Lazy days…
00:24
Anwar Jibawi
Рет қаралды 7 МЛН
Turn Off the Vacum And Sit Back and Laugh 🤣
00:34
SKITSFUL
Рет қаралды 7 МЛН
How You Can Easily Make Your Code Simpler in Godot 4
6:59
Bitlytic
Рет қаралды 465 М.
Can I Remake Super Mario World in Godot? (Part 1)
18:44
Creating SMART enemies from scratch! | Devlog
5:40
Challacade
Рет қаралды 361 М.
How to Add Interaction in Godot 4
16:48
Nagi
Рет қаралды 22 М.
Godot Scripts I add to Every Game
12:34
Aarimous
Рет қаралды 47 М.
How I Made a 3D Platformer in 2D Game Engine
21:23
ggenije
Рет қаралды 554 М.
Do THIS Before You Publish Your Godot Game
3:33
StayAtHomeDev
Рет қаралды 187 М.