NickTheBrick

Villager
Member
Joined
Sep 2, 2018
Messages
15
Reaction score
2
First Language
English
Primarily Uses
N/A
For starters, I am using the Yanfly Row Formation Plugin for my actors, and I have 3 of them in a party.
I wish to have one of the characters use a skill that gives every alive party member that is in row 1 a specific state.
I tried to experiment with certain script calls and common events, such as this


$gameParty.rowAliveMembers(1).addState(3)

And I know that the plugin identifies that there are actors in the front row, but the game identifies them as [object, Object] rather than the actors name.

So I know the plugin identifies that someone is in the first row, but it cant seem to specify who.
Would someone be able to help me out with this, feel free to ask any more questions.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
8,875
Reaction score
6,676
First Language
English
Primarily Uses
RMMV
$gameParty.rowAliveMembers(1).addState(3)
That's not valid syntax - rowAliveMembers() will return an array, but addState() is a method of the Game_Actor object.

In order to use addState(), you need to be referencing one specific element of the array, such as $gameParty.rowAliveMembers(1)[0].addState(3)

If you want to apply the state to every actor in that array, you can use JavaScript's built-in array functions.

Code:
$gameParty.rowAliveMembers(1).forEach(actor => actor.addState(3))
 

NickTheBrick

Villager
Member
Joined
Sep 2, 2018
Messages
15
Reaction score
2
First Language
English
Primarily Uses
N/A
That works, thank you so much.
For something else I was wondering, I know that each row can have its own states.
Would it be possible to have a lunatic state event happen from getting these states when you move into these rows?
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
8,875
Reaction score
6,676
First Language
English
Primarily Uses
RMMV
Yanfly's Buffs and States Core has documentation for Custom Add and Custom Remove Effects.
 

Latest Threads

Latest Profile Posts

imgur sure is getting weird, one day I lose gradually all my images, the other I get them back randomly and then again they disappear again.
Despite OPT2 praise it still has some strange stories in it. Lady Mikka is trying to work herself to death because of guilt. Guilt over what? ¯\_(ツ)_/¯ So instead of finding a NPC to have a heart to heart with her they decide the cure is a new kimono. So when she drops dead she'll at least be well dressed. I haven't even got to the strange part yet.
Did so much work on the game today. I wish I could post it all in this status update but there is a character limit of course haha. I thought about making a topic for updates, though... maybe.
The most recent sign that I am old. I have done martial arts for over 4 decades. Never HAD to stretch out. Good, of course, but never required. Was doing some kicks in the kitchen because, why not, and I felt a pop in the back of my thigh. Now I am limping around. Gotta love getting old.
One of the biggest perks of being fluent in English is how many new and interesting recipes I am able to find and try out that I would have hardly come across if I just spoke my mothertounge :3

Forum statistics

Threads
131,682
Messages
1,222,221
Members
173,435
Latest member
TheAmplifier
Top