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,896
Reaction score
6,700
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,896
Reaction score
6,700
First Language
English
Primarily Uses
RMMV
Yanfly's Buffs and States Core has documentation for Custom Add and Custom Remove Effects.
 

Latest Threads

Latest Posts

Latest Profile Posts

This could probably be an entire thread, but it’s really interesting how replaying a game several years later can change how you relate to a character. I think Tidus from FFX got such a bad rap. I getchu. Completely different reaction as an adult now.
As you see, I still enjoy writing tutorials. Is there anything specific you want to see? (I know mapping and editing/resource making is usually popular, but those are very broad topics)
Well, I wanted to expand player battlers visually and now have 3 sheets and counting for each of my players party.
1. Regular sheet
2. The character has turned stone sheet.
3. Using potions sheet.

Technically the main hero has 4 since he starts with a wooden sword, and I felt that the battler should reflect that until he gets a metal one.

Right back to the RM game dev grind in about 15 minutes. :LZSexcite:
Days ago I gave someone the sage advice not to steer away from your main project or take up another one to abandon the first. After figuring a way that would save me years of development, I am forced to redo a lot of stuff on my own turf, near to remake half of what I have already made.
Somewhere down the line I must have crossed paths with bad karma.
:kaomad2:

Forum statistics

Threads
131,733
Messages
1,222,756
Members
173,484
Latest member
sewamobilbali
Top