RMMZ How to get a state to force a skill, targeting its host? Trying to use <JS On Add State>

Status
Not open for further replies.

fallenlorelei

Veteran
Veteran
Joined
Jul 8, 2013
Messages
306
Reaction score
357
First Language
English
Primarily Uses
Basically I'd like a skill to fire once a state is applied.

The state itself is being added through a script:

JavaScript:
for (const target of BattleManager._targets) {
if (target.states().contains($dataStates[43])
&& target.states().contains($dataStates[44])) {

target.addState(53);

And all that works fine. But now I'd like a skill to deal damage to the target, once the state is applied.

The notetag I'm using is
<JS On Add State>
user.forceAction(52, -1);
BattleManager.forceAction(user);
</JS On Add State>

But it isn't doing anything... Ideas?

Edit: Okay so "user" needed to be "target" LOL. I think it's working? I'm not sure how to delete the post =X
 
Last edited:

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
16,554
Reaction score
9,187
First Language
English
Primarily Uses
RMMV

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Latest Threads

Latest Profile Posts

Remember to do your 0,01% progress on your game today!
Went to see Jujutsu Kaisen 0 yesterday, it was cool. The movie wasnt really a masterpiece, it had some pacing and characterization problems, but overall I enjoyed it, maybe because it was the first anime film I have ever been to in the cinema lol. The battle animation & music were top-notch. I havent seen much of the anime so people who watched the entire season would probably like it more.
MainMenu.PNG
Finally satisfied with the main menu xD

The plan was to have battle sprites in the menu...But these faces from Ocean's Nostalgia look pretty damn good imo. (Will have to adjust for them ofc and maybe recolor to match the overworld/battle sprites more)
It's always disturbing to me to see my cat eating something off the bathroom floor.

Forum statistics

Threads
121,988
Messages
1,145,736
Members
160,259
Latest member
Leonson
Top