Heath, IFrames, Health Pickup! - Godot 4 Platformer Tutorial - Part 9

  Рет қаралды 3,650

GameDevKnight

GameDevKnight

Күн бұрын

Hope you guys enjoy the tutorial, as always thank you guys for the support you guys are the best, and have a nice day everyone!
0:00 Intro
0:13 FallingSpikes Fix
1:03 Health & IFrames
5:20 Health Pickup
7:22 Outro
Come watch me stream!
kick.com/gamedevknight
Endless Nite - gamedevknight.itch.io/endless...
Buy me a coffee - ko-fi.com/gamedevknight
Discord - / discord
Instagram - / gamedevknight
twitter - / gamedevknightt

Пікірлер: 27
@artofeugeneseguiban2773
@artofeugeneseguiban2773 11 ай бұрын
Love it ☺️ thank u so much 💗
@GameDevKnight
@GameDevKnight 11 ай бұрын
you're the best man
@ianpullinger4785
@ianpullinger4785 11 ай бұрын
Thats, enjoying the pace of the tutorials 👍
@GameDevKnight
@GameDevKnight 11 ай бұрын
Thanks my man
@trzsttxrzz
@trzsttxrzz 11 ай бұрын
Nice tutorial, helped me a lot !
@devon674
@devon674 7 ай бұрын
so two issues I ran into with the spikes, 1) one is that they reset to their original position...exactly once. 2) they immediately fall again even if the player is not in the detection area I commented out any code to do with them colliding with bodies so that wouldn't confuse the issue. not sweating this too much as idk if my game really needs falling spikes or if they do if I need them to magically reset, much more interested in the damage and health stuff!
@user-sk9zg1vn3s
@user-sk9zg1vn3s 11 ай бұрын
Awesome tutorial! Subbed!. Looking forward to see more :)
@GameDevKnight
@GameDevKnight 11 ай бұрын
thanks a lot man!
@Pablito_Dev
@Pablito_Dev 8 ай бұрын
Cool vid! i figured out a way to add a death animation when health reaches 0 . I set state for death = false and then at the take damage function set it to true and add an if statement that if death = true . animation_player.play("die") , then went to the animation and add a callback method to the animation so when its finished take the player to the global position ! (i learned that from you hehhe) . I took me a while to make that code , but hey after one week of learning im kind of able to do things on my own . Thanks for the knowledge senpai ! Edit: also at the update_animations func after the !attack conditional also added !attack and !death. Because after 30 min watching the screen and scratching my head i figured out that the animation wasnt showing up correctly bc of the update animation function.
@GameDevKnight
@GameDevKnight 8 ай бұрын
Ay really nice man, glad to hear you can do things on your own and that's essentially how we did it too (I think? been a while since the last tutorial I can't even remember). Keep up the good work!
@devon674
@devon674 7 ай бұрын
I've got something similar going on although I used slightly different methodology, now I need to update it as I implement the take_damage functionality demonstrated in this vid.
@arlekino8848
@arlekino8848 Ай бұрын
wuaaa whats the code? D:
@devon674
@devon674 7 ай бұрын
I bet you get to this in one of the next videos (still catching up) but instead of the s function called from the take_damage function, I played a damage animation, and used the property track to keyframe the animation so that invincible = true when it starts then invincible = false. I needed to tinker around with the animation logic in update_animation and physics_process so that the damage_animation wouldn't get canceled/overwritten, but I figured it out within 20 minutes or so.
@GameDevKnight
@GameDevKnight 7 ай бұрын
Yeah we do that too but goodjob man
@the_RCB_films
@the_RCB_films 7 күн бұрын
do you have a tutorial for actually assigning the player sprite as a player?
@dimtool4183
@dimtool4183 9 ай бұрын
Hm, my falling_spikes after spawning again reset to a y position that matches with some "crosshair" X that when hovering over it is shared by LevelOne, TileMap and CoinHolder (matching y position with it, not x). What is this crosshair and how to fix it? 4.2 dev 5. It also stops resetting after it hits me.
@GameDevKnight
@GameDevKnight 9 ай бұрын
So I think we fix the falling spikes later, or maybe I helped someone in discord to fix it and forgot to in a video, all you have to do instead of queue_free on the falling spikes script is reset it, but I am pretty sure you can just completely remove the queue free line and the spike will reset after a few seconds, I will look at the crosshair issue in a second
@GameDevKnight
@GameDevKnight 9 ай бұрын
I've been trying to figure it out a bit but I'm struggling to recreate the issue you are having, could you maybe come send screenshots of the issue in the discord?
@1Darr
@1Darr 10 ай бұрын
I've run into a problem where if my player has s and runs into spikes before the s run out, they can just stay standing on the spikes and not take any damage forever until they exit and re-enter the spikes. Is there any way to fix this?
@GameDevKnight
@GameDevKnight 10 ай бұрын
I left it like that because some older platformers have it that way, the reason is because the signal on the spikes only gets triggered when the player walks into the zone, but on your spike script you can make a new function, and make a while loop like this while true: await get_tree().create_timer(1).timeout var overlapping_objects = $Area2D.get_overlapping_areas() for area in overlapping_objects: if area.get_parent() is Player: area.get_parent().take_damage(1) if you aren't up to the latests tutorials where we change the player to take damage instead of just dying just do area.get_parent().die() for now call the function in your ready function, the while loop will go on infinitely and every second it will look for all the area's inside of the spikes area and if the area is a Player class it will deal damage to the player, this will make a small performance impact but it will solve your problem.
@1Darr
@1Darr 10 ай бұрын
​@@GameDevKnight Thank you so much. 😄
@estebansobera9713
@estebansobera9713 4 ай бұрын
se que pasaron 5 meses pero a mi me funciono esto dentro de la funcion conectada on_area2D_area_entered(area) despues de la linea take_damage( ) $Area2D.set_deferred("monitoring", false) await get_tree().create_timer(1).timeout $Area2D.set_deferred("monitoring", true)
@MohammedEssamSaleh
@MohammedEssamSaleh 11 ай бұрын
اريد المزيد من الدورات❤
@treverfeil9151
@treverfeil9151 11 ай бұрын
😕 'promo sm'
@GameDevKnight
@GameDevKnight 11 ай бұрын
Hello brother I see the sad emoji, what do you mean by 'promo sm'?
@MohammedEssamSaleh
@MohammedEssamSaleh 11 ай бұрын
اريد المزيد من الدورات❤
@GameDevKnight
@GameDevKnight 11 ай бұрын
I will make more videos my brother thank you for the comment
Optimizing my Game so it Runs on a Potato
19:02
Blargis
Рет қаралды 435 М.
Smart Sigma Kid #funny #sigma #comedy
00:19
CRAZY GREAPA
Рет қаралды 21 МЛН
I Made the Same Game in 9 Engines
16:12
Emeral
Рет қаралды 269 М.
Top 10 Scratch 3D Games!
9:41
ShiftClickLearn
Рет қаралды 268 М.
I programmed Minecraft from scratch... again.
11:44
jdh
Рет қаралды 565 М.
4 Godot 4 Devs Make 4 Games in 44 Hours
25:19
DevLogLogan
Рет қаралды 475 М.
How to Make a Great Health Bar in Godot 4 | Let's Godot
8:24
DashNothing
Рет қаралды 27 М.
I Got EVERY ACHIEVEMENT In Super Mario 64 - RetroAchievements
20:06
Smart Sigma Kid #funny #sigma #comedy
00:19
CRAZY GREAPA
Рет қаралды 21 МЛН