I'm trying to come up with a way to visually indicate which character is about to be attacked by putting an animation over them at the start of a turn. Though I'm not quite sure if there's a way to do this without having the enemy have scripted targets.
Is there a way to check which actor is being targeted at the start of a turn?
Javascript/Plugin SupportI think its not possible though, unless you kinda force it with one of yanfly plugin and use some coding,
otherwise, it needs a plugin, but still, I'm not sure if it is even posible, but it really depends on the
how and why you want to know which actor is being attack.
will you be able to heal that person, special attack, or other way around to block, dodge something?
more details how you want a battle is how other can help you more on the spot of your issue.
we can not guess whle it might not resolve your issue if not specific.
otherwise, it needs a plugin, but still, I'm not sure if it is even posible, but it really depends on the
how and why you want to know which actor is being attack.
will you be able to heal that person, special attack, or other way around to block, dodge something?
more details how you want a battle is how other can help you more on the spot of your issue.
we can not guess whle it might not resolve your issue if not specific.
even completely ignoring the coding complexity, there is another big problem with this:
what do you do with several enemies targeting different actors in a turn?
Simply placing a mark on every target will not be enough to show which enemy will attack which actor, that would require at least colored or named marks.
what do you do with several enemies targeting different actors in a turn?
Simply placing a mark on every target will not be enough to show which enemy will attack which actor, that would require at least colored or named marks.
I'm using this in conjunction with Yanfly's Row Formation plugin. The idea is that I want a specified actor to be highlighted as a warning sign, If the actor does not adjust their position they will be damaged.
I was just wondering if there's any change in code I can look at or if all targets are only decided once an enemy uses an action.
Hi, from my understanding, enemy targets are decided at the action level, meaning that they choose target when it's their turn to act. So, my guess is that it would require a plugin that heavily alter the default engine targeting mechanics.
I was afraid to hear that. Is there no way to at least fake it?
i.e. rolling a number between 0 and 3 at the start of every turn and forcing the enemy to target those indices?
yes, that can be done. you can give one actor a state that increases the target rate and all other actors get one that reduces the target rate to zero. that will change the target randomness of the enemy skills toward the actor with the increased target rate.
Thank you all for the responses but I think I've found a suitable workaround with Yanfly's Action Sequences plugin.
I've decided to have a random number saved to a variable at the start of a turn and then when the skill is executed I'll have that variable called and applied to a targeting action with Yanfly's system.
I've decided to have a random number saved to a variable at the start of a turn and then when the skill is executed I'll have that variable called and applied to a targeting action with Yanfly's system.
If you can get a hand on YEP_Target core, you could try to force enemies to target an index refering to a variable that you would set at the start of turn by using this notetag in the regular attack skill notebox (or any skill you want to behave as such):
Code:
<Custom Target Eval>
if (user.isEnemy()) {
let index = $gameVariables.value(X);
target = ($gameVariables.value(X) <= $gameParty.aliveMembers().length) ? targets.push($gameParty.aliveMembers()[index]):targets.push($gameParty.aliveMembers()[0]);
} else {
for (let i in foes.aliveMembers()) {
if (foes.aliveMembers()[i] === target) {
targets.push(foes.aliveMembers()[i]);
}
}
}
</Custom Target Eval>
Edit: @Papillon
I guess that would work too. Good luck!
I'll give this a try too. Thank you for the help!
Thread closed
Original thread: https://forums.rpgmakerweb.com/threads/is-there-a-way-to-check-which-actor-is-being-targeted-at-the-start-of-a-turn.117588/