Yanfly's action sequence plugin poses problem for scripting amatuer <RESOLVED>

Status
Not open for further replies.

marbeltoast

Your future fish emporer
Veteran
Joined
Nov 11, 2018
Messages
77
Reaction score
27
First Language
English
Primarily Uses
RMMV
Good day, all. I'll be brief and clear.

I'm using Yanfly's action sequence pack 1 and also his enhanced TP plugins. I'm trying to create an attack (Let's call it "Momentum Swing", for reference) that uses how much TP the attacker has when they start the attack to determine the damage, as well as their attack and the enemy defence. I also want using the attack to set the attacker's TP to zero afterwards.

Two issues emerged at first: I also want other attacks to generate TP based on which TP mode the player is in when they deal damage, take damage, kill enemies, etc. I want the removal effect of Momentum Swing to overwrite this TP mode based gain and loss, which would normally leave the player with +10 TP after sucessfully dealing damage, or a different amount depending on the mode they choose.

Issue two: I don't know how to write a line of javascript that can be slotted into the <finish action> section that reduces the specific party member's TP to 0. I can write a line outside of this context, something like "$gameParty.members()[x].gainTp(-n)" where x is the party member in question and n is the max TP possible, but I'm not sure how to re-phrase that into the <finish action> area without it just not working.

Any and all assistance that you could provide would be greatly appreciated. Thanks and have a good day and a lovely weekend!
 

TSR

The Northern Frog
Veteran
Joined
Nov 14, 2019
Messages
149
Reaction score
90
First Language
French
Primarily Uses
RMMV
Hi there!
If you want to use a Js line in <finish action> to set the user TP to zero, use:
Code:
eval: user.setTp(0);
*note that action sequence pack 1 has plugin commands lines to change the TP value, refer to the plugin instruction

I'm not too sure I understand your first issue.
 

marbeltoast

Your future fish emporer
Veteran
Joined
Nov 11, 2018
Messages
77
Reaction score
27
First Language
English
Primarily Uses
RMMV
It seems that the solution to the second problem has ALSO fixed the first issue! After gaining 10TP from sucessfully dealing damage, the TP reduction effect occured and reduced the TP to 0, which means it's already working as intended. I was worried that it would reduce to 0 and AFTERWARDS gain the 10 from dealing damage, but it seems my worries were unecessary! Cheers for that, mate!
 
  • Like
Reactions: TSR

Kes

Global Moderators
Global Mod
Joined
Aug 3, 2012
Messages
21,772
Reaction score
10,987
First Language
English
Primarily Uses
RMVXA

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.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Okay, that's the best I can do. Looks a little strange but..err.. it's my style, yeah, very original style..
being an extreme introvert with massive anxiety... I forget this is really, REALLY frustrating for people who are the exact opposite. still, wait this out and stay home...
I hope you all are keeping safe. <3 If you need a shoulder or an ear, I have two of both and am more than willing to listen & support you! Times are weird.
My dad, super frustrated by seclusion, asking me how I live like this. I shrug. "It helps to not like what is outside."
Apparently it's not just people who are hit by corona virus. My phone has set itself to English language on its own. Not that I'm complaining... :D

Forum statistics

Threads
95,443
Messages
929,187
Members
125,685
Latest member
imnotanepicgamer
Top