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

So Deltarune Chapter 2 is supposed to release today... if it's out already, has anyone played it? And I can't because I have a stinking Mac and not a Windows PC.
I forgot that forums have profile walls that you can post or comment on, guess I found a new platform to specifically rant about game-related deranged thought or problems that I have. Salut mes amis!
I couldn't help myself, so I edited the tiles a bit and made a birdhouse :LZSsmile: I hope I will finish the town today!Screenshot 2021-09-17 134349.png
How do I find the threads I have watched? It's been so long I've forgotten :kaoswt:
So far, this is how the wall tileset its looking in-editor. :kaoswt2:
1631863283853.png
Still thinking on details to add.

Forum statistics

Threads
115,135
Messages
1,087,500
Members
149,643
Latest member
Loyalvib
Top