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
73
Reaction score
26
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
138
Reaction score
78
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
73
Reaction score
26
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,634
Reaction score
10,932
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

People in Italy panicking for this stupid coronavirus, it's nothing more than a flu and they are all acting like it's the black plague...
Blech. I hate coming up with stories. Making gameplay is fun but coming up with lore and reasons for these areas/mechanics just makes me sleepy.
40 card deck size, the plugin seems more sluggish.
Village theme I composed for a commission!

Forum statistics

Threads
94,567
Messages
921,939
Members
124,430
Latest member
Venator123
Top