Vampire Survivors Remake
Enemy blink + weapon push [#8 Vampire Survivors Remake in GameMaker ]
The video tutorial shows you how to give the enemy i-frames and swap the sprite to indicate an invulnaribilty state which is being reset later on. The idea is quite simple. You want the enemy only to get hit by the weapons only a fraction of the time. To get there we use two sprites one that indicates that you can hit the enemy and substract health from it and another that indicates (the white one) that the enemy is not targetable and the collision code ignores it totally. To reset we have already a looping alarm which we used for depth sorting, so here we can add a reseting code for each enemy to set the sprite back to the regular one. That means we can only hit the enemy with a weapon 3 times per second (the alarm loops each 20 steps). That’s it!
Optional part: We simply take the position of the weapon and the enemy hit and get the direction to push to with point_direction. Then we instantly reset the position of the enemy toward the new (push) position to indicate visually that the weapon has an effect on it.
🚧 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:39 Subscribe
0:55 The concept what we do
1:46 Giving each enemy two sprites to swap
3:02 Weapons swap the sprite of the enemy and give it i-frames
4:23 Reset the enemy sprite back to normal
5:32 Optional – push enemies back
7:22 Game shown: Astalon: Tears Of The Earth
Add comment