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
151
Reaction score
92
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

Veteran
Veteran
Joined
Aug 3, 2012
Messages
21,779
Reaction score
10,999
First Language
English
Primarily Uses
RMVXA
[CLOSED].[/CLOSED]
 
Status
Not open for further replies.

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

Latest Threads

Latest Posts

Latest Profile Posts

I was planning to release a useless plugin for april fools, but then I thought I let it be.
Tfw every dev around me is using Live2D in their MV games and make me question my skills repeatedly.

Spending the day reworking my maps, especially the first "biome". This time it's not even in the dark. :LZSwink:
Activity on the forums has increased lately, probably because of people staying home. The amount of work for moderators has increased lol.

Forum statistics

Threads
95,522
Messages
929,786
Members
125,791
Latest member
Oersted_LAL
Top