This demonstration shows several sprites that can be killed all using different GameMakerLanguage (GML) programming.
A set of three methodologies for managing animated objects that change from dynamic to static (like non-player characters with behaviour that that can die and become inert, only needing to be drawn). Each method have different levels of functionality
Row 1: NPC's that very simply skip their dynamic behaviour when a Boolean variable is false. Row 2: NPC's that change to an object with their faster static behaviour. Row 3: NPC's that pass information to a controller object that draws the NPC's sprite.
Each methodology has four different implementations to show how each methodology can perform a variety of simple actions without becoming a burden of the CPU.
Column 1: NPC's simply drop and remain active indefinitely. Column 2: NPC's drop and generate a ghost sprite that hovers above them. Column 3: NPC's slowly fade away after they die. Column 4: NPC's blink several times then vanish after they die.