Killing the enemy and looting coin in Godot 4
In this video we gonna kill our enemy, play a dead animation and instance a coin when he dies, using Godot 4 . Like and subscribe!
#godot4 #godotengine #godot
Asset link is here: https://jeanmakesgames.itch.io/2d-rpg-asset
Wishlist my game "Lone Knight" here: https://store.steampowered.com/app/2211930/Lone_Knight/
For halloween I'm discounted my courses, valid until the 31st of October! :)
My godot engine 4 course is discounted here:
https://www.udemy.com/course/learn-godot-4-by-making-a-2d-game/?couponCode=HALLOWEENGODOT
Coupon Code: HALLOWEENGODOT
Create a 2d platformer / metroidvania in godot engine 3:
https://www.udemy.com/course/create-a-2d-platformer-game-with-godot-engine/?couponCode=HALLOWEENGODOT
coupon: HALLOWEENGODOT
Create a 2d rpg with godot engine 3:
https://www.udemy.com/course/create-a-2d-rpg-with-the-godot-engine/?couponCode=HALLOWEENGODOT
coupon: HALLOWEENGODOT
Learn C# in godot 3 by creating a 2d rpg:
https://www.udemy.com/course/learning-csharp-with-godot/?couponCode=HALLOWEENGODOT
coupon: HALLOWEENGODOT
Happy halloween to everyone!
Timeline
00:00 Introduction
00:29 Start
00:38 Adding the hitbox of my enemy
01:31 Setting the right layer to my enemy hitbox
01:55 Connect the signal of my area
02:21 Removing health point to our enemy
02:44 Removing health point ONLY when colliding with the sword
03:48 Killing the enemy when he has no health point
03:58 Creating our dead state
04:31 Creating the dead function
06:06 Creating a dead fx animation
07:58 Save my dead fx scene
08:15 Instancing my dead fx when my enemy die
09:08 Create a function to instance my dead animation
11:18 Looting a coin when the enemy dies
13:29 Fixing the size of the collision shape of my coins