How to make an event trigger after multiple enemies are defeated

Post here for help and support regarding LunaLua and SMBX2's libraries and features.

Moderator: Userbase Moderators

AlphaBlue1011
Spiny
Spiny
Posts: 27
Joined: Sun Feb 02, 2025 3:00 pm
Flair: never underestimate hyperfixations :3
Pronouns: she/her or they/them

How to make an event trigger after multiple enemies are defeated

Postby AlphaBlue1011 » Wed Feb 26, 2025 2:25 pm

Say, for example, I want to make something similar to TTYD's Pit of 100 Trials. In that, the way to the next room is only revealed after all the enemies in a room are defeated. In SMBX2, making an event trigger after defeating one specific enemy is simple enough, being done entirely in the editor. but how would I go about making an event trigger once a few specific enemies are defeated?

Added in 4 minutes 5 seconds:
I say "specific" because my plan is to separate a section into multiple rooms using MrDoubleA's customCamera, so making it so all enemies in a section having to be defeated to proceed wouldn't work. It would have to be specific enemies.

mariobrigade2018
Rocky Wrench
Rocky Wrench
Posts: 607
Joined: Wed May 24, 2023 7:00 pm
Flair: OK in coding who dreams of making a Mario game
Pronouns: he/him

Re: How to make an event trigger after multiple enemies are defeated

Postby mariobrigade2018 » Wed Feb 26, 2025 3:01 pm

All you need to do is put all of the NPC in a layer, and move all the npcs that use the death event trigger to use the “layer is empty” trigger. However, some NPCs, notably the snifits, don’t always trigger it, which this fixes:
viewtopic.php?t=27124


Return to “LunaLua Help”

Who is online

Users browsing this forum: No registered users and 4 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari