RPG Maker Forums

Consider the following code, executed in battle, DIRECTLY after a player commits an action:

        this._actorWhobrokeLaw.gainHp(-lawObject.amount);        if (this._actorWhobrokeLaw._hp <= 0) {          this._actorWhobrokeLaw.die();          this._actorWhobrokeLaw.preformCollapse();        }Couple things to note: this._actorWhobrokeLaw is a game actor instance. Obviously.  lets assume amount is 1000.

So what happens when a player executes the attack command and this code is triggered?

Screen Shot 2015-11-12 at 1.18.57 PM.png

The first thing in the stack is the

Screen Shot 2015-11-12 at 1.20.10 PM.png

The particular line we care about is the else  in the inf statement.  the cursor blinks on context, I believe context is not defined in this instance.

How does this have anything to do with yanfly?

This code:

Screen Shot 2015-11-12 at 1.23.20 PM.png

particularly the: this.contents at the bottom of the page.

So my question is, how do you update the actors health directly after they execute an action? I have it so that I say, in the Game Action, apply function, that:

On hit, if target is a game enemy and the item is attack, take 1000 hp from the player.

Any ideas about these errors? Is there a simple solution here?

Latest Threads

Latest Posts

Latest Profile Posts

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.
time for a new avatar :)

Forum statistics

Threads
106,018
Messages
1,018,357
Members
137,803
Latest member
andrewcole
Top