I have searched through the documentation so much and maybe I keep missing it but cannot find this. I want a skill to change how many targets it has when afflected by a state. So normally it targets 1 enemy, but when a casting state is on the user it does more damage to the whole row. the problem is when I use action effect, it has no options for flanks or ranks (or to change damage but i see custom damage formual there)
Changing Targets to a Row in VS Battle Core + Grid System
RPG Maker MZ SupportIf you don't need the target select area to change, but just want to damage enemies on the same row, you can make in the skill action sequence to hit all enemies on the row if the attacker has a state (or use notetags for just damage).
You can get the positions with
You can get the positions with
target.gridRank() and target.gridFlank() (use correct reference for 'target'). Then go through $gameTroop.aliveMembers() and hit all enemies with the same rank or flank as the original target.i am unsure what any of that means? are they plugin commands or script?
Those are scripts. Let's say you have 3 (alive) enemies. Then you get their ranks (don't remember if "row" was rank of flank) with:
$gameTroop.aliveMembers()[0].gridRank();$gameTroop.aliveMembers()[1].gridRank();$gameTroop.aliveMembers()[2].gridRank();thank you so far but i have a very not good understanding of this kinda of stuff, enemies left alive is dynamic, ive tried some next target stuff in engine but im so confused sorry haha
I think it's easiest if you just use the Battle Core JS Targets notetag on the SKILL (change state id + like I said, I don't know if you want rank or flank):
EDIT: Oh and I assumed this was actors targeting enemies. If enemies can also use the skill, I think you can replace where it currently says
<JS Targets>if (user.isStateAffected(X)) {const rank = targets[0].gridRank();targets = $gameTroop.aliveMembers().filter(enemy => enemy.gridRank() === rank);}</JS Targets>EDIT: Oh and I assumed this was actors targeting enemies. If enemies can also use the skill, I think you can replace where it currently says
$gameTroop.aliveMembers() with user.opponentsUnit().aliveMembers()Thank you for this, where are you getting the gridRank/Flank() from? im trying to get my guy to jump to a targetted grid now but im using those and he flies off the screen
Check the console battler methods. If you show what you've done for the jump skill, maybe someone can help.
Original thread: https://forums.rpgmakerweb.com/threads/changing-targets-to-a-row-in-vs-battle-core-grid-system.181730/