Target Indicator for Enemy Attacks

Hmmmmm. So I was wondering two things:

* Is there a script that lets you see who enemies will target before they use their attacks in combat? (Like the enemy flashes and a targeting reticle that pops up on the actor?)

* Or at the very least, the function to change their graphics depending on the attack they are about to use (I.e Slime Monster is about to use a powerful AOE so its body changes into a different sprite, etc.)

Any help would be appreciated.
* Is there a script that lets you see who enemies will target before they use their attacks in combat? (Like the enemy flashes and a targeting reticle that pops up on the actor?)
If you have 4 enemies, how are you gonna solve this problem?
If two enemies are targeting two single actors and the rest are using AoE, how does the targeting indicator works? would they overlap with each other?

* Or at the very least, the function to change their graphics depending on the attack they are about to use (I.e Slime Monster is about to use a powerful AOE so its body changes into a different sprite, etc.)
The only pre-requisite you need to have is either state animation or change the sprite based on the state. Then, as you have said in your status update, make states determine their attack. Put at priority 10 on their attack pattern. And make sure to apply another state at the end of their action.

The only downside is if you want this to work for every enemy, you gotta do this for every enemy manually.
If you have 4 enemies, how are you gonna solve this problem?
If two enemies are targeting two single actors and the rest are using AoE, how does the targeting indicator works? would they overlap with each other?

😳 Oops, I didn't think of that. There goes that plan, lmao.

The only pre-requisite you need to have is either state animation or change the sprite based on the state. Then, as you have said in your status update, make states determine their attack. Put at priority 10 on their attack pattern. And make sure to apply another state at the end of their action.

The only downside is if you want this to work for every enemy, you gotta do this for every enemy manually.

Hmmm. So that's good for an attack where the enemy has to charge up their attack before using it, which I already know how to do.

I think the most important question is when do enemies in RPG Maker use their attacks? Is it queued before the player chooses their own actions or when the turn starts?

Because my intended implementation looks a bit like this:
  • Previous turn ends
  • Actor action selection begins
  • Enemy changes sprite because they have [x] attack queued up, giving the player a hint about what attack is about to be used
  • Turn progresses and enemy attacks
  • Turn ends and enemy reverts to normal sprite because they finished using that attack.
If this isn't how it works then I'll cook something up with states and Yanfly's instant cast.
Hmmm. So that's good for an attack where the enemy has to charge up their attack before using it, which I already know how to do.
But isn't that essentially what you were describing tho?
An indicator of what attack they are going to use next.

I think the most important question is when do enemies in RPG Maker use their attacks? Is it queued before the player chooses their own actions or when the turn starts?
The attack is already determined before the player inputs their command, at least for the default turn system or YF free turn battle. I can't say about the other systems.

So basically, they charge up their attack beforehand. And they already have a target lined up as well. They just don't tell you.

----
As extra information, however, this behavior might pose a funny interaction. For example, if the target died or something unexpected happened during the turn, they might target themself or have other funny interactions. This could happen more often if you set attack times more than once in their trait set (features). In my project, I always re-roll the attack pattern right before they act to make sure it always fulfills their attack condition.

For example, you set an enemy to have two times actions. You set one skill to have a condition "affected by state x". In this particular skill, you removed the state after their action, but their second action would still use the skill because the action is already queued. I didn't want that, so I rerolled using my own custom enemy AI script.

Enemy changes sprite because they have [x] attack queued up, giving the player a hint about what attack is about to be used
This is out of the scope of discussion because it's a game design, but ...
What's the point of giving the indication to the enemy after you input the command?
Isn't that the whole reason for this is to mitigate their action?
But isn't that essentially what you were describing tho?
An indicator of what attack they are going to use next.

... In hindsight, yes. Forgive me, my brain just doesn't work sometimes.

It usually takes me a while to make solutions just by talking about it.

The attack is already determined before the player inputs their command, at least for the default turn system or YF free turn battle. I can't say about the other systems.

So basically, they charge up their attack beforehand. And they already have a target lined up as well. They just don't tell you.

Ah see, that's what I was thinking was the case.

This is out of the scope of discussion because it's a game design, but ...
What's the point of giving the indication to the enemy after you input the command?
Isn't that the whole reason for this is to mitigate their action?

It's not after, it's before. That's why I asked about how enemy attacks are queued, since that informs my decision on what to do for this. That said, I might have overcomplicated this for two reasons:

#1: I have Yanfly State Animations and Lunatic Objects

#2: Enemies in my games have exact turns where they use certain skills anyway, so it wouldn't be hard to have states activate in the troop editor every other turn.
So, are you going to settle with state animation as we discussed or you're still looking for something else?
So, are you going to settle with state animation as we discussed or you're still looking for something else?

I'm going to settle with the state animation one. I've tested it out and while it's not completely perfect (i.e I can't account for attacks that are marked as "always"), for predictable patterns it's very good.

Thanks for bringing it to my attention, Theo.
I do believe TA shouldn't have discouraged you from indicating which actors aka heroes will be attacked by monsters. It's not that hard to accomplish IF you don't care about being UNSPECIFIC in regards of which monsters will actually do it.

For instance, you could show some icon on top of those heroes that will be targeted by 2 or more enemies. Thus, the icon would serve as a warning, especially if that hero has low HP.
I never discouraged the OP. I only ask a question.
I'm not even discouraged @kyonides. It really is a matter of what I will try to make this work, and Theo's suggestion wound up doing what I wanted.
Well, he really tried to make you change your mind (twice?), and that's exactly what I was talking about there. It doesn't matter if you no don't need to implement my idea, a mere variant of RCX's. Just keep in mind it's still possible to do that. It's not hard to come up with such a modification.
Being critical is not the same as trying to change your mind. Please do not misinterpret my intention. I suggest if this is already solved, report to the mod.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/target-indicator-for-enemy-attacks.152555/