This is the 7th video in a series on remaking Vampire Survivors in GameMaker.

The video tutorial shows you how to use the weapons created to damage the enemies and if their hp pool is zero to destroy them. For that we first assign a damage value to the weapon parent and assign a hp variable in the enemy parent which is getting substracted later on. So we need to create a collision rectangle list (or any other collision you prefer) to get the id of the enemy being hit/collided with and there we substract from each enemy hit the hp the damage value. If the hp is zero or below we remove the enemy instance from the game. That’s it!

To refine this system, we organize the damage values of each weapon in the player and each time we spawn a weapon we grab the current value, which will increase/change during gameplay. Normally you would do that in an outside controller object, but this simplified version does the trick also. Also note that we use a collision [rectangle] list because this is making sure we get each step all the instances getting hit by the weapon. The regular collisions only collide with one instance each step which would result in instance visibly hit not getting any kind of damage or hp reduction.


🚧 For the future: This series will will build expanded the further we go into the series.


💻Project + assets found here:
https://1up-indie2.itch.io/vampire-survivors-mini-engine


👑 Support me and get fresh game art and game maker projects every month:
https://www.patreon.com/1upindie

Follow me on:
📸 Instangram: https://www.instagram.com/1upindie
🐦 Twitter: https://twitter.com/1upIndie
💬 Discord: https://discord.gg/gvr98nb
📜 Udemy: https://www.udemy.com/course/become-a-video-game-developer-with-gms-23/ (See youtube about page for discount)

CHAPTERS
——————————————————————————————————-
0:00 What we will do
0:43 Subscribe
0:55 The concept what we do
2:05 Create a damage variable for all weapons
2:36 Create a health variable in all enemies
3:24 Make a step event that can collide with all enemies
6:55 Refine the system by storing and grabbing unique damage values for each weapon
8:32 foreshadowing the next video
9:00 Game shown: Astalon: Tears Of The Earth

1up Indie

View all posts

Add comment

Your email address will not be published.