RMMZ Skills and States Core VisuStella MZ <JS On Expire State> Doesn't Work!

PixelBoy360

Veteran
Veteran
Joined
Apr 11, 2015
Messages
52
Reaction score
7
First Language
English
I've been trying to apply to a state:


<JS On Expire State>
user.forceAction(394, -1);
BattleManager.forceAction($gameParty.members()[1]);
</JS On Expire State>

But it doesn't apply the skill at all.

I was referencing this thread:
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
5,038
Reaction score
4,650
First Language
English
Primarily Uses
RMMZ
I've been trying to apply to a state:


<JS On Expire State>
user.forceAction(394, -1);
BattleManager.forceAction($gameParty.members()[1]);
</JS On Expire State>

But it doesn't apply the skill at all.
Can I see the state setup in your database, please?
 

PixelBoy360

Veteran
Veteran
Joined
Apr 11, 2015
Messages
52
Reaction score
7
First Language
English
<JS On Expire State>
user.forceAction(211, -1);
BattleManager.forceAction($gameParty.members()[1]);
</JS On Expire State>

1647470406337.png
Can I see the state setup in your database, please?
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
5,038
Reaction score
4,650
First Language
English
Primarily Uses
RMMZ
It's worth noting that my own Jump uses -2 for the target and is in a JS Pre-Regenerate rather than On Expire.

1647471974450.png
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
5,038
Reaction score
4,650
First Language
English
Primarily Uses
RMMZ
JavaScript:
<JS On Add State>
  target._jumpTurns = 2;
</JS On Add State>

<JS Pre-Damage As Target>
  target.clearResult();
</JS Pre-Damage As Target>

<JS Pre-Regenerate>
  target._jumpTurns--;
  if (target._jumpTurns <= 0) {
    const skill = 277;
    const target = -2;
    user.forceAction(skill, target);
    BattleManager.forceAction(user);
  }
</JS Pre-Regenerate>
 

PixelBoy360

Veteran
Veteran
Joined
Apr 11, 2015
Messages
52
Reaction score
7
First Language
English
I think it worked, I'm going to double check it in an hour and get back to you!
 

Latest Threads

Latest Posts

Latest Profile Posts

Mimics! Mimics everywhere!
Pirate portrait quickie :LZYcheeze:
pirate.png
My game has a (much needed) tutorial now...
Game Making Every Day #20:kaohi:

ScreenShot_8_14_2022_11_55_51.png
FINALLY added the comic bubble to the Title Screen...

Forum statistics

Threads
124,508
Messages
1,164,120
Members
163,334
Latest member
Spiketrap
Top