You can use a little lua workaround. Make a file called lunadll.lua inside your level folder (the folder with the name of the level, where you put custom graphics in), and paste the following inside:
Code: Select all
--Change the variables here so that the text in quotation marks matches the names of the "Death" events of the boss NPCs
local firstLayerDeathEvent = "REPLACE THIS"
local secondLayerDeathEvent = "REPLACE THIS TOO"
--Change the variable here so that the text in quotation marks matches the name of the event you would like to be executed when both NPCs died.
local bothDeadEvent = "REPLACE THIS AS WELL"
local firstEnemyDefeated = false
local secondEnemyDefeated = false
function onEvent(eventname)
if eventname == firstLayerDeathEvent then
firstEnemyDefeated = true
elseif eventname == secondLayerDeathEvent then
secondEnemyDefeated = true
end
if firstEnemyDefeated and secondEnemyDefeated then
firstEnemyDefeated = false
secondEnemyDefeated = false
triggerEvent(bothDeadEvent)
end
end
Make sure to replace the marked sections, too.
What this code does is keep track of which enemies have been defeated, and triggers an event as soon as both are defeated. OnEvent is a function that runs every time any SMBX event is called.