SpinnyFunny

Warper
Member
Joined
Mar 23, 2023
Messages
4
Reaction score
0
First Language
English
Primarily Uses
RMMV
Hello,

I'm trying to make an attack that will restore mana to the party if a plugin-specific variable is high enough. I'm using SRD's Timed Attack plugins (http://sumrndm.site/timed-attack-wheel/).

Right now, my code is something like:

if ($gameTemp.tas_power >= 0.75)
$gameParty.aliveMembers().addBuff(3,3);

This isn't working though, really not great with code, any help would be appreciated.
 

Shaz

Keeper of the Nuts
Global Mod
Joined
Mar 2, 2012
Messages
46,153
Reaction score
16,960
First Language
English
Primarily Uses
RMMV

I've moved this thread to Plugin Support. Thank you.

 

ATT_Turan

Forewarner of the Black Wind
Regular
Joined
Jul 2, 2014
Messages
11,152
Reaction score
9,101
First Language
English
Primarily Uses
RMMV
$gameParty.aliveMembers().addBuff(3,3);
This isn't valid syntax - aliveMembers() is the array of all the living party members, and addBuff() needs to be called on a specific actor.

Also, it wouldn't do what you said - adding a buff doesn't restore mana (MP).

You could do something like:
Code:
$gameParty.aliveMembers().forEach(actor => actor.gainMp(20));
That will restore 20 MP to each living actor in the party.
 

SpinnyFunny

Warper
Member
Joined
Mar 23, 2023
Messages
4
Reaction score
0
First Language
English
Primarily Uses
RMMV
This isn't valid syntax - aliveMembers() is the array of all the living party members, and addBuff() needs to be called on a specific actor.

Also, it wouldn't do what you said - adding a buff doesn't restore mana (MP).

You could do something like:
Code:
$gameParty.aliveMembers().forEach(actor => actor.gainMp(20));
That will restore 20 MP to each living actor in the party.
Ohhh, I see, thank you so much! Sorry, I had a few different things I was trying to get to work between the buffs and the MP, so my code looks even more confused haha.

Thanks again!
 

Latest Posts

Latest Profile Posts

I'm pretty sure me watching Netflix while having sushi just led to me eating the tail of my tempura shrimp.
1696004095642.png
...and now he even makes resources, too! xD
OMG Y'all. I found an alternate Google Drive I 100% forgot I had. All my crusty old game files from 2014 (when I signed up) are in there. When I like...maybe actually make a prototype thread it's gonna be so much fun taking everyone down my memory lane.
We are at the finish line!!! Thank you COMMUNITY!!!
GameCompletion.jpg

Forum statistics

Threads
134,903
Messages
1,251,753
Members
177,723
Latest member
DemonHitmaker
Top