Hi everyone!
Im having a bit of trouble with the Row Formation scripting. First I'll show what I have right now.
<Physical Taunt>
<Custom Row Condition>
if ($gameTroop.rowAliveSize(1) == 0)
{
if ("Is a troop in row 2") // This is what I need help with
{
condition = true;
}
else
{
condition = false;
}
}
else
{
condition = false;
}
</Custom Row Condition>
I've been working on this for a little while now I cant seem to get it right. I want the troops in row 2 to get a custom condition when the troops in row 1 die.
There have been a few examples on here but they don't really work the way that I need. If you remove the inner if/else statement but keep the "condition = true;" what you get is BOTH troop and party members in their respective row 2s get the condition (Because ($gameTroop.rowAliveSize(1) == 0) is true).
I added the extra if statement to add an argument that asks if its a troop and not an actor.
I've tried so many different things and when I think I've found it I actually just make a statement that is always true haha...
<Physical Taunt>
<Custom Row Condition>
if (user.isEnemy()) {
if ($gameTroop.rowAliveSize(1) == 0) {
condition = true;
} else
condition = false;
}
</Custom Row Condition>
This way, enemies in row 2 get the state if all enemies in row 1 died(or row 1 doesn't exist), your party will never get this state.
Edit: Sadly for the equivalent for actors I only get an error:
<Physical Taunt>
<Custom Row Condition>
if (user.isActor()) {
if ($gameParty.rowAliveSize(1) == 0) {
condition = true;
} else
condition = false;
}
</Custom Row Condition>
The problem is very likely this: "$gameParty.rowAliveSize(1) == 0", although this is similar to the line Yanfly wrote in the help file.
I got the error too but got around it by adding:
if($gameVariables.value(1) == 1)
{
if (user.isActor()) {
if ($gameParty.rowAliveSize(1) == 0) {
condition = true;
} else
condition = false;
}
}
else{
condition = false;
}
</Custom Row Condition>
Then i changed the in game Variable 1 to 1 once I loaded into a New Game.
Sorry about the formatting. Im on my phone.
Do you have the newest version of this plugin? 1.07?
I have 1.07.
Now that I'm home and on my laptop, this is the code I use for the actors:
<Custom Row Condition>
if($gameVariables.value(1) == 1)
{
if (user.isActor()) {
if ($gameParty.rowAliveSize(1) == 0) {
condition = true;
} else
condition = false;
}
else
condition = false;
}
else
{
condition = false;
}
</Custom Row Condition>
<Physical Taunt>
I do not get the error when this. Since variables are 0 or something on the Title Screen.
Im sure its the "$gameParty.rowAliveSize(x)"
That code will give you an error.
To get everything to work correctly:
-Create 2 new states
-On the first map that appears (the map that appears when you press new game),
create an event with a parallel process. In this event make it change a variable to 1. Make sure you note the Variable ID.
-Put this in one of the state's note box and change the "VARIABLE ID HERE" to the ID that you selected above.
<Custom Row Condition>
if($gameVariables.value(VARIABLE ID HERE) == 1)
{
if (user.isActor()) {
if ($gameParty.rowAliveSize(1) == 0) {
condition = true;
} else
condition = false;
}
else
condition = false;
}
else
{
condition = false;
}
</Custom Row Condition>
<Physical Taunt>
-And put this in the other state (No extra setup for this one)
<Physical Taunt>
<Custom Row Condition>
if (user.isEnemy()) {
if ($gameTroop.rowAliveSize(1) == 0) {
condition = true;
} else
condition = false;
}
else
condition = false;
</Custom Row Condition>
Remember to make sure you add those state IDs into the Row 2 States in the plugin setup
Now it should work.
Its ok, I just updated some of my other Yanfly Engine Plugins and I stopped getting the error.
Hi everyone! I will use this forum to ask something too about Row Formation. I wonder if someone can help me to give a start for a mechanics that I want to test in my game. I would like that every character meet a condition move to a specific row. For example: If a character is full HP it will be in front line, on half HP the character automatically slide back in second line and so on. I'm sorry I cant provide any code write by me because my java skills are very little 🙁