Pretty everyone knows this effect: The hitflash as a visual representation that an object (such as an enemy) was hit by an attack.
In GMS2, this is oftentimes achieved by either using a shader (shoutout to Shaun Spalding) which draws the sprite in solid white or by using a dedicated, solid-white subimage. Blending doesn’t really work since you can use blending to have a solid black sprite but not a solid white one.
However, this quick tip shows you a different approach, using an often overlooked function and basically just three easy lines of code.
Requirements are a basic understanding of Game Maker Studio 2 as I am not going into detail on how to create objects or how to fire events.
Intro and Outro Music: “Home Sweet Megalopolis” by TeknoAXE, licensed under a Creative Commons Attribution 4.0 International License
Xem thêm bài viết khác: https://dccwo.org/game/