MV self switch parallel process (Chrono Engine)

Good day.

I'm using the Chrono Engine plugin for RPG Maker MV (real-time battle).

I've already set everything up. Everything works great.

I'm having a problem using self-switches for enemies.

I set up self-switch C (notetag on database) so that when an enemy dies, a new event page with its death sprite is displayed.

The problem is that I want that new event page to be in a parallel process to switch to two more graphics (death animation), but nothing ever happens. It's as if the event remains completely inactive (even though it's in a parallel process). It also doesn't work to put all those instructions in the movement routes of that event page.

Is there any way to fix this?

Thanks.
Please show us a screenshot of that event page, and do NOT crop away any part of the event window.

there are several things that you could have done wrong when setting it up.
Please show us a screenshot of that event page, and do NOT crop away any part of the event window.

there are several things that you could have done wrong when setting it up.

Here's a screenshot of the event.

It doesn't matter if it's in a parallel process, none of those instructions are ever executed.

I think maybe the plugin disables an enemy's event somehow after it dies.

1752784645435.png
I think maybe the plugin disables an enemy's event somehow after it dies.
It might be - I don't know that plugin, never having used it.
But such a possibility doesn't really make sense to me, because nothing on that event page tells the engine that it is an enemy event, and other event pages are not processed. That's why I considered but dismissed that possibility before my first post.

But I admit, my focus was on checking if you had an error in the page priority or something like that.

I suppose you now have to wait for the answer of someone who uses that plugin.
If I'm not mistaken, when a battler dies in chrono engine, the event is erased similar to the event erase command. So any of the event commands following its death never run because the event is erased. Using the death self switch is more for when the map is re-entered/reloaded to not have the enemy "respawn".

Hope this helps, good luck.
I commented out this line so the enemy event doesn't disappear when it's defeated.

JavaScript:
Game_CharacterBase.prototype.setDeadEnemy = function(char,battler) {

var mapId = $gameMap.mapId(); // Current player map
var eventId = this._eventId; // Current event (enemy)

this.setDeadSwitch(battler);
this.setDeadVariable(battler);
this.setDeadSelfSwitch(char,battler);
this.makeTreasure(char,battler);
this.prepareDeadSprite(char,battler);

if (!char._user.treasure[0]) {
//this.executeCollapse(char,battler) // Don't remove the enemy sprite upon death

The event is still there (the death sprite is shown)

But it still doesn't execute the instructions on the page (self switch C), even if it's in a parallel process.
What does the enemy database page look like?

This is what my enemy death pages look like but I do use an event spawner to spawn them in and unspawn them after death.
1752804875466.png
Database page my enemy:

1752858362295.png


I noticed something very curious.

The page with the self switch C (event in parallel process) doesn't execute any instructions when the enemy dies.

But if I exit the map and re-enter, those instructions are executed.

But that doesn't work anymore. I need them to execute once the enemy dies. Do I have to refresh the event or something? How would I do that?

This is the method in the MOG_ChronoEngine.js plugin where the enemy dies.

JavaScript:
Game_CharacterBase.prototype.setDeadEnemy = function(char,battler) {
   
    var mapId = $gameMap.mapId(); // Current player map
    var eventId = this._eventId;  // Current event (enemy)
   
   this.setDeadSwitch(battler);
   this.setDeadVariable(battler);
   this.setDeadSelfSwitch(char,battler);
   this.makeTreasure(char,battler);
   this.prepareDeadSprite(char,battler);
 
   if (!char._user.treasure[0]) {
       //this.executeCollapse(char,battler) // Do not remove enemy sprite upon death
         
    var enemyId = char.battler().enemyId();  /

    if (enemyId >= 1) {
   
        var enemy = $dataEnemies[enemyId];
        var match = enemy.note.match(/<enemigo:\s*(\d+)>/);

        if (match) {
         
           $gameVariables.setValue(14, parseInt(match[1]));
         
        } else {
         
           $gameVariables.setValue(14, 0);
        }
    }
   
   } else {;
      if ($gameSystem.isChronoMode()) {char.jump(0,0)};
   };
   char._chrono.deadChecked = false;
   char.battler().performCollapse();
   char._user.rotation = [0,0];
 
};
Could you put this script followed by an Erase Event on the C page and let me know what happens?
Code:
$gameSelfSwitches.setValue([$gameMap.mapId(), this.character(0)._eventId, 'C'], false);
Could you put this script followed by an Erase Event on the C page and let me know what happens?
Code:
$gameSelfSwitches.setValue([$gameMap.mapId(), this.character(0)._eventId, 'C'], false);


What happens with that line of script is that the event resets when I re-enter the map, the enemy revives.

I don't want that. I just want to set some animations (change enemy's graphics) and play a sound on the page (self switch C). But it doesn't work.

It only executes those instructions when I exit the map and re-enter.

Sorry if I can't express myself well, I don't know English, I use a translator XD
What happens if you just put a wait 5 frames at the end of the move route?
What happens if you just put a wait 5 frames at the end of the move route?

nothing happens, it stays the same.
Could you restore the lines you commented out? I think you are stopping the sequence of triggers that should be happening by commenting out code.
Could you restore the lines you commented out? I think you are stopping the sequence of triggers that should be happening by commenting out code.
JavaScript:
//this.executeCollapse(char,battler)

This line I commented out is to delete the event from the map, so it disappears completely, and I don't want that.

I'm displaying the enemy's corpse on the page (self switch C).

If I uncomment that line, the event is deleted and disappears from the map. And when I re-enter the map, it revives, as if it had never been defeated.
What happens if you set that page to action trigger instead of parallel?
What happens if you set that page to action trigger instead of parallel?

nothing happens, it stays the same.
Well I will just say that your copy of Chrono Engine is working different than mine because mine runs whatever commands are on the page even if set to action trigger.
Which plugin are you using? Chrono Engine (original) Or a modified version (Cross Engine)?

I'm using Cross Engine. Also, could you show all three pages of your enemy's event? And if they have a Dead Self Switch in the database?
your notetag is wrong (which I consume its a comment tag.

notetags are probably set on the event and not database,
as notetags uses < and > to set tags in between, not without them.

so where did you read the notetag Dead Selfswitch : C?
The OP's notetag is not wrong. That's what it looks like in Chrono Engine. Since OP said the page does execute entering the map again, the self switch is being toggled, but it happened after the enemy died, and the OP commenting out that line of code doesn't stop it from dying.

When an enemy dies ChronoEngine automatically drops its opacity to 0 then erases the event.

Original thread: https://forums.rpgmakerweb.com/threads/self-switch-parallel-process-chrono-engine.178992/