This should be fairly simple... I need a way to make a standard boss "Explode" when it is killed. The sequence should go something like this:

  • The script checks a specific enemy's health and its current location on the screen. If it dies, it will then go on to the next step.
  • Depending on what enemy it was, it will then proceed to draw a duplicate in its place that flashes as if it's been hurt, play a "boss death" sound effect and wait for it to finish before continuing.
  • The boss then "explodes" in a sequence of randomly-placed explosion animations. (Not Bomb explosions, mind you.) After three seconds, the boss's replacement graphic will be removed, and after another two seconds the explosions will end.
  • The script then continues to check the room for all enemies. If there are no other enemies besides triggers, it will kill the trigger, effectively clearing the room and ending the battle. The script will then end.


This way, the script can be adapted for whatever the quest designer needs as a boss. Ideally it should be able to reference enemy tiles by itself, but if that's not possible, then the author would have to tell it what combo to use.