Blinking player heart [#4 Remake Undertale in GameMaker ]

Опубликовано: 04 Ноябрь 2024
на канале: 1up Indie
354
17

This is the 4th in a short series of remaking the battle system which you see in Undertale in GameMaker.

What is Undertale?
Undertale is a video game made also in GameMaker by Toby Fox where
you play as a child that is being trapped in an unknown world and your job in this linear story is to progress. The difference is that you can genocide monsters, be neutral or even befriend them. This throws the concept of enemies being simply neutral farm on it's head.

// Part 4
This time we need indicate to the player that if the heart clips/collides with any obsticle/bullet we need to put the state into a hit state that blinks the heart. For that we have to have a timer running down and once that timer is below 0 we set the alpha to 0.4 or 1 depending what it currently is. That is it!


🚧 For the future: This series is under construction. There will is a free downloadable project file for everybody, so you can grab and do whatever you like to do with it (you can credit me, but not necessary). Also, this video series will be handled like my Hotline Miami series. If the views drop off a cliff (that I do see happening) it will be then discontinued.

Template project file found here:
  / discord  


👑 Support me and get fresh game art and game maker projects every month:
  / 1upindie  

Follow me on:
📸 Instangram:   / 1upindie  
🐦 Twitter:   / 1upindie  
💬 Discord:   / discord  
📜 Udemy: https://www.udemy.com/course/become-a... (See youtube about page for discount)

Chapters
----------------------------------------------------------------------------------------
0:00 What we will do
0:40 Add timer variables for the blinking and the alpha for the heart
1:30 Run down the timer for blinking
1:45 If the timer is below 0 reset the timer
2:06 Check the current alpha and set it 0.4 or 1
3:08 Create a variable that defines a state, here a hit/idle state
3:24 Encapsulate/wrap the blinking code into the hit state