Jump to content
Sign in to follow this  
Schloops

Respawning Enemies

Recommended Posts

I've created a multi-map dungeon, and I would like to set it so that once a player leaves the dungeon completely, all of the enemies inside respawn.

However, I'm also using the Sapphire Battle System, so it's making things a little bit more complicated.

The way I have enemies set up right now is this:

Event Page 1: SAS Enemy battle, turns on Self-Switch A when defeated

Event Page 2: Death Animation, gives player gold, turns on Self-Switch B

Event Page 3: Nothing

 

If I use erase event, then the enemies respawn when the player leaves the screen, but there are multiple maps in the dungeon. I would like the enemies to respawn only after the player leaves the dungeon.

 

There's got to be some solution involving switches or variables when a player enters or leaves the dungeon, and I'm hoping it's not literally creating a separate switch for each enemy, I just can't think of a good solution right now.

 

Any help would be appreciated!

Share this post


Link to post
Share on other sites

One way would be to use $game_self_switches[[map,event,'self_switch']] = false/true

so if you had the event for an enemy as event5 on map 12, you would use

$game_self_switches[[12, 5, 'B']] = false

$game_self_switches[[12, 5, 'A']] = false

 

Set this up for all your events in the dungeon.

 

Probably best to use a common event and just call the common event when leaving the dungeon.

Share this post


Link to post
Share on other sites

That's exactly what I wanted! I tried it out and it worked perfectly. Thank you very much! :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted