i dont think that a plugin is needed, you could use a common event with a bit of script..
There are event commands for adding/removing actors from party.
There is always the "active event id" and the "target event id" stored in variables.
"
$gameSystem.EventToUnit(eventID)[1]" gives access to the eventUnit.
But you need to know if its an Actor or Enemy,there you can ask about the "eventType"
(actor or enemy)
For example in battle you could use a script that asks about all events:
- if the unit is an actor
- if the actorUnit is dead,not dead,alive ,not alive
(there are script for "is alive" & "is death",
both can use "!" at the beginning which means "not")
- if the actorUnit_eventID is the same as the targetUnitEventID or the activeUnitEventID
->and if all those if Conditions are "true",than you can run any script
Here is the Script that asks about those Conditions and if any Actor fits in, it will execute: "$gameParty.removeActor(actorID);"
..I made 2 version because i think that death Units could be not active/target event anymore:
NOTE:
there was a mistake in the "remove actor" script part, i added "event id" but i think it should be "actor ID"..
Its already fixed
JavaScript:
//0(checks target/active event id): ScriptCall "this.RemoveDeathActor();"
// game interpreter function
Game_Interpreter.prototype.RemoveDeathActor = function() {// this can be removed if used in a common event
// check all map events
for (var i = 1; i <= $gameMap.events().length; i++) {
// access to Battler data
var battleunit = $gameSystem.EventToUnit([i]);
// access to GameMap event data
var eventunit = $gameMap.event([i]);
// if the event ID of "Event" and "Battler" are same and if its an actor which is death
if (battleunit && eventunit && (battleunit[0] === 'actor') && (battleunit[1].isDead())) {
// if the Event ID is also the same as "target" or "active" event ID
// Sideote: it could be that a dead unit is none of both!
if (($gameTemp.targetEvent().eventId() === [i]) || ($gameTemp.activeEvent().eventId() === [i])) {
//your remove actor code + actor ID from Battler
var battlerActorID = battleunit[1]._actorId
$gameParty.removeActor(battlerActorID);
// here could also be any other Script that is executed if these Conditions are "true"
// "[i]" is the event ID which is checked from all map events
}
}
}
};// this can be removed if used in a common event
//1(checks NOT target/active event id): ScriptCall "this.RemoveDeathActor();"
// game interpreter function
Game_Interpreter.prototype.RemoveDeathActor = function() { // this can be removed if used in a common event
// check all map events
for (var i = 1; i <= $gameMap.events().length; i++) {
// access to Battler data
var battleunit = $gameSystem.EventToUnit([i]);
// access to GameMap event data
var eventunit = $gameMap.event([i]);
// if the event ID of "Event" and "Battler" are same and if its an actor which is death
if (battleunit && eventunit && (battleunit[0] === 'actor') && (battleunit[1].isDead())) {
//your remove actor code + actor ID from Battler
var battlerActorID = battleunit[1]._actorId
$gameParty.removeActor(battlerActorID);
// here could also be any other Script that is executed if these Conditions are "true"
// "[i]" is the event ID which is checked from all map events
}
}
}; // this can be removed if used in a common event