Crestfall9

Procrastinator
Member
Joined
Mar 5, 2018
Messages
13
Reaction score
6
First Language
Indonesian
Primarily Uses
RMMV
Hey, I'm the same guy thinking about adding a death's door mechanic.
So I was looking through the codes and found this:

Code:
Game_Battler.prototype.refresh = function() {
    Game_BattlerBase.prototype.refresh.call(this);
    if (this.hp === 0) {
        this.addState(this.deathStateId());
    } else {
        this.removeState(this.deathStateId());
    }
};

I want to overwrite it so that this.hp will be -1.
I'm very new to JavaScript (still haven't memorized all the operators) and I don't think I can just rewrite the function in my code.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,006
First Language
Tagalog
Primarily Uses
RMVXA
You want to change this.hp === 0 to check for -1 instead? just change it to this.hp === -1
 

Crestfall9

Procrastinator
Member
Joined
Mar 5, 2018
Messages
13
Reaction score
6
First Language
Indonesian
Primarily Uses
RMMV
Just like that? Shouldn't there be conflicts, etc?
 

Latest Threads

Latest Posts

Latest Profile Posts

Changed my avatar, goodbye Alan Sugar, hello George Carlin (one of my favorite human beings ever)
If you still don't subscribe our Polish channel please consider it :)
1.png
Who wants to see my review of the worst star wars movie? This movie has all the excitement of being on Jury Duty of the most boring case ever about trade negotiations.
A lot to learn to make a game. Can I handle it?
I've been working on status effects since last thursday, and today I finished the core mechanic of Zombie, Teleport, Curse and Recall. Zombie and Curse are lacking a few things to make them complete atm. Teleport though is the "HAHA" spell for some of my mobs, but can "NOPE" at them with Recall.

Forum statistics

Threads
115,169
Messages
1,087,785
Members
149,715
Latest member
Shiromori
Top