MV Enemy attacks first regardless of agi?

Title says it. I've been trying to do some stuff with battle events that need the player to attack first, i've set the agility of the player to 999, and the one from the enemy to 1, and tried a few other things. Yet the enemy STILL attacks first. I haven't found a reason nor a solution for this.
Thank you if you decide to help, haven't found anything about this while searching for it, so i'm rather helpless lol.
What are the skills that the enemies are using, what are the actors using, and have you set the "Speed" parameter on them? if the enemy is using a skill with high speed like how "Guard" is set up in a new project, or the actor is using a low speed skill, it could cause that.

Similarly, do your enemies, actors, or equipment on the actors have an action speed trait set to them?

And to make sure - are you using any plugins? plugins can easily make changes youre not aware of if youve recently added one
Okay, first of all, i'm doing this in a clean project, and after testing all these, i've realized the issue was because of what i was doing with battle events; it checked if the actor attacked or not, and if they did, it'd make a variable go up by 1 and force the enemy to do a certain attack based on that variable. If they did not attack, the variable wouldn't increase and the enemy would do one of three random attacks.

This, along one of SRD's plugins, would allow me to make a linear bossfight similar to Sans' fight in Undertale, where the only way of making the fight progress was attacking him and him dodging it, making his next attack, and repeating until he gets tired.

Forcing the enemy to attack made it attack first no matter what, so i have to figure out how to fix that, at least i know the issue now. I apologize for not giving enough information beforehand. Here's the events:
Screenshot_24.png

Screenshot_25.png

Screenshot_26.png

This goes on for a bit more but it's the same lines slightly changed.

The result of this is that the enemy waits, player attacks/doesn't attack, and the consequences of the player doing such would only show next turn.

What i'm trying to do is: Player attacks/doesn't attack first, and the action the enemy does this turn would be affected by the player doing attacking/not attacking.

Hope what i said is not hard to understand 🙂
Forcing the enemy to attack made it attack first no matter what
your events where you force the actions arent set to turn end, so theyll fire off at the start of the turn rather than at the end after the player.

Additionally, i believe the BattleManager would have cleared the current action by the time youre checking it? Im not certain offhand.

What i'm trying to do is: Player attacks/doesn't attack first, and the action the enemy does this turn would be affected by the player doing attacking/not attacking.
If like undertale, the player has only one attack skill (or just a handful of skills), then you could use a common event in the skill(s) effects that sets your attacked switch to ON, set the switch to OFF at turn 0 for this fight, make the enemy act based on the switch's value, and then set it to OFF once youre done at the end of the turn.
if the player ever attacks, the common event makes the switch ON, you progress the fight, and then turn it OFF to be ready for the next turn. if they dont attack, then the switch will already be OFF and you have the enemy do its repeat attack.
Additionally, i believe the BattleManager would have cleared the current action by the time youre checking it? Im not certain offhand.
I think it does clear it before i check it indeed, that didn't work out.

Now, Your last response has been very helpful towards making me figure out how to make this work, and i did manage to do it!
Screenshot_33.png

Screenshot_34.png

Screenshot_35.png

Screenshot_36.png


Though, while this does work, the enemy does a random attack from its action pattern list first, and then does the attack it was supposed to do at the very end. Which shouldn't happen and is pretty weird. Have tried a few different things but no luck. Any ideas?

Here's the action pattern list if it helps:
1775302538990.png

Thanks by the way 🙂
the enemy does a random attack from its action pattern list first, and then does the attack it was supposed to do at the very end. Which shouldn't happen and is pretty weird. Have tried a few different things but no luck. Any ideas?
If you're going to force the enemy to attack through troop events at the end of the turn, they'll still have their normal action before then. Nothing strange there.

At that point, you can either remove the skills from the enemy and have the troop event itself force a random skill, or you can reverse how you use the current switch so that it's ON when the player doesn't attack and OFF when they do, and then give all of their skills a condition that the switch has to be on in order to use it actually, that one might require a plugin. I don't think enemies reconsider their actions if conditions change between the start of the turn and when they act.
Heya, so, following what you said, it's fully cleared out now. I'm real happy with the result and wouldn't have been able to do it without help lol, so yeah, thanks a lot!!!

Original thread: https://forums.rpgmakerweb.com/threads/enemy-attacks-first-regardless-of-agi.183130/