How to make disappearing bodies upon transfer.

I'm fairly new to using RPG Maker as a whole but I have at least figured out how to have enemies roam my maps as enemies.  What I've done so far is have it to where after one of those enemies is defeated, an unconscious body remains, I did this by having the event touch trigger battle processing and then after the battle a control switch turns on that will change the event's sprite to the damaged one.  The body remains there and that's what I want, all except for when the body stays after going through a door or being transferred somewhere else.  I want the body or the event to be gone after the player moves into another map.  How would I do this?
If you want the enemy to return, change the switch back to its original setting.

If you want the enemy (and its body) to be gone forever, add a third page with no event graphic (and "Through" set to ON) and have that require an additional switch.   Then, when you transfer maps, check each enemy to see if its "body" switch is On - and if so set this additional switch to be On as well.
If you want the enemy to return, change the switch back to its original setting.

If you want the enemy (and its body) to be gone forever, add a third page with no event graphic (and "Through" set to ON) and have that require an additional switch.   Then, when you transfer maps, check each enemy to see if its "body" switch is On - and if so set this additional switch to be On as well.
That didn't work at all.  Are you talking about setting up variables too?  I made an additional page of which would be bought on by a switch on page 2 and it did nothing.  The body is still there when I change maps.  Here is how I have it setup now.  All I want is for the dead enemy to disappear after leaving the map.  What did I do wrong?

switchproblem1_by_sol_tamida-d9esgc9.jpg
switchproblem2_by_sol_tamida-d9esgdr.jpg
switchproblem3_by_sol_tamida-d9esgfa.jpg
That didn't work at all.  Are you talking about setting up variables too?  I made an additional page of which would be bought on by a switch on page 2 and it did nothing.  The body is still there when I change maps.  Here is how I have it setup now.  All I want is for the dead enemy to disappear after leaving the map.  What did I do wrong?
You set it up wrong.  The way you currently have it, "speaking" to the body will disappear.  This is not what you want - so clear the "Contents" box in page 2 (I also recommend using Direction Fix on page 2 so that the body won't turn to you when you try to interact with it, but that's up to you).

What you need to do is have to have the second switch ("Nurse Body Vanish") turn On when you leave the area.  So whatever you are using to transfer the player from this map, just make sure the event turns on that Switch right before the Player Transfer.
You set it up wrong.  The way you currently have it, "speaking" to the body will disappear.  This is not what you want - so clear the "Contents" box in page 2 (I also recommend using Direction Fix on page 2 so that the body won't turn to you when you try to interact with it, but that's up to you).

What you need to do is have to have the second switch ("Nurse Body Vanish") turn On when you leave the area.  So whatever you are using to transfer the player from this map, just make sure the event turns on that Switch right before the Player Transfer.
Thanks, though I ended up figuring that out on my own.  Now the body disappears when I leave the room after having it turn the switch on, but apparently if there are duplicates of this event, beating just one will beat them all.  Will I have to setup switched for each enemy I have roaming around, or is there a better way?

Sure it might just be easier to have the enemies just disappear with a self switch after defeating them, but for these particular enemies I don't want it to feel like they're being 'killed' so much as being knocked out.  So if there isn't a better way then I guess I'll just have to deal with it for this part of the game.
I know In ACE you could use a self switch for when each body was to show (by setting it to A), then could change the self switch of that event at transfer to B. It took a script call though, as you are changing the self switch of another event (which can only be done by scripts), and I don't know the MV equivalent, maybe someone else would?

Otherwise, you would probably need one switch per body to do what you want to do...at least you can have up to 5000 of them!
Either use different switches for each enemy, or use Self Switches (which makes it much easier to copy events).

Self Switches will be relatively easy for "knocking the enemy out" but I think you will need to use a "Script Call" (on page 3 of event commands) to switch each event to its final "cleaned up from the map" mode (unless doing this via Events is a new MV feature).   The self switches were easy to set with a script command in Ace and are probably similarly easy in MV but I don't know the syntax in MV.
There is a plugin in the download that does this. Look in the Kadokawa folder for Outer Self switch. Install and use the super simple plugin command.
Thanks, though I ended up figuring that out on my own.  Now the body disappears when I leave the room after having it turn the switch on, but apparently if there are duplicates of this event, beating just one will beat them all.  Will I have to setup switched for each enemy I have roaming around, or is there a better way?

Sure it might just be easier to have the enemies just disappear with a self switch after defeating them, but for these particular enemies I don't want it to feel like they're being 'killed' so much as being knocked out.  So if there isn't a better way then I guess I'll just have to deal with it for this part of the game.
Isn't it because the switch that makes the body dissapears on one event, is the same that makes all the others dissapear?

In that case, make sure that the criteria to dissapear (the event page that makes them dissapear) is having both ''dead body'' SelfSwitch AND Dissapear Switch turned on. 

So, your nurses will dissapear if the switch is turned on (if the player has went out of the place and come back) AND if the nurse was beaten. 

Not just if the player gets out or just if the nurse was beaten.

Not sure if this was your problem, just wanted to clear it too.
There is a plugin in the download that does this. Look in the Kadokawa folder for Outer Self switch. Install and use the super simple plugin command.
That was an idea, but I have no idea how I'm supposed to use the command to make the self switches do what I want.  Rather, I'm still fairly new to this program and although I grasp the concept of self switches, plugin commands like that one actually manage to confuse me.  I need help on how that works.  I know I can put a command in the note tag of some things, but I don't know how that will work with the Outer Self Switch plugin.

 

Either use different switches for each enemy, or use Self Switches (which makes it much easier to copy events).

Self Switches will be relatively easy for "knocking the enemy out" but I think you will need to use a "Script Call" (on page 3 of event commands) to switch each event to its final "cleaned up from the map" mode (unless doing this via Events is a new MV feature).   The self switches were easy to set with a script command in Ace and are probably similarly easy in MV but I don't know the syntax in MV.

 
I really don't understand how to do script calls.  I guess I might have to watch a few more tutorials, maybe that will help with that.

 

Isn't it because the switch that makes the body dissapears on one event, is the same that makes all the others dissapear?

In that case, make sure that the criteria to dissapear (the event page that makes them dissapear) is having both ''dead body'' SelfSwitch AND Dissapear Switch turned on. 

So, your nurses will dissapear if the switch is turned on (if the player has went out of the place and come back) AND if the nurse was beaten. 

Not just if the player gets out or just if the nurse was beaten.

Not sure if this was your problem, just wanted to clear it too.

 
Yes it is because it's the same switch they all use. I wanted to try and minimize how many switches I made so I can have plenty of them for making traps and quests later.

Just to be clear, none of the nurses I have setup use any self switches because the last time I tried that, despite having a sprite for their collapsed state the nurse would still disappear completely after being beaten, and I hadn't even left the area yet.  I've just been using control switches.  So are you telling me to try and use a self switch along with the Collapsedbody switch and disappearing switch I made?

I'm going to try this, it might really help me.  Thanks for the help.

Edit: Solution found.

I found a way to do it without a whole lot of switches or anything.  Just one switch is needed for all enemies bodies.  The switch that turns on upon leaving the map that hides their bodies just needs to be turned off again when an enemy that hasn't been beaten is defeated.  That way the body doesn't automatically vanish because the switch is on.

I feel dumb for not seeing this before, but maybe I was just so frustrated that I couldn't think clearly.

Here's pictures to show you what I mean.

vanishing_bodies_1_by_sol_tamida-d9ezgm2.png
vanishing_bodies_2_by_sol_tamida-d9ezgls.png
vanishing_bodies_3_by_sol_tamida-d9ezglf.png


vanishing_bodies_4_by_sol_tamida-d9ezgl3.png

Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-disappearing-bodies-upon-transfer.48229/