Hi everyone, I am trying to to a system that, when a battler reaches 0 MP, the battler dies.
I am trying everything I know (I know very little about programming...), and I have a problem.
If I use a script in the core of the game, the game crashes when I am in game and try to load or start another new game. It is because of an incompatibility with visustella plugin skill states core (for some reason I don't know about).
The coding is the following:
So, this doesn't work.
Can someone please help me?
I think I am missing something pretty common.
I am trying everything I know (I know very little about programming...), and I have a problem.
If I use a script in the core of the game, the game crashes when I am in game and try to load or start another new game. It is because of an incompatibility with visustella plugin skill states core (for some reason I don't know about).
The coding is the following:
Game_Battler.prototype.refresh = function() {
Game_BattlerBase.prototype.refresh.call(this);
if (this.hp === 0 || this.mp === 0) {
this.addState(this.deathStateId());
} else {
this.removeState(this.deathStateId());
}
};
Game_BattlerBase.prototype.refresh.call(this);
if (this.hp === 0 || this.mp === 0) {
this.addState(this.deathStateId());
} else {
this.removeState(this.deathStateId());
}
};
So, this doesn't work.
Can someone please help me?
I think I am missing something pretty common.