Is it possible to check that with a fork condition in a battle event (at turn 0)?
MZ Test if you have surprised the enemies (preemptive attack)
Javascript/Plugin SupportThe BattleManager has a flag for it. Try BattleManager._surprise as a script condition
Or
BattleManager._preemptive.Like this?
Yes.
But you would have known about 5 minutes earlier if you tried the playtest for it
But you would have known about 5 minutes earlier if you tried the playtest for it
I tried and got no preemptive.
Interesting. I can't look at the engine code till later, but maybe the flag gets set to false after the battle starts as a part of setting up that initial turn? Ill check it out when I can
I just tested without plugins and it works for me: after several random encounters with a Raise Preemptive trait, I got the default "upper hand" message (preemptive battle), and the turn-0 troop event check passed correctly.
Note that the surprise/preemptive flags get reset on turn end, so this won't work on turn 1+.
Note that the surprise/preemptive flags get reset on turn end, so this won't work on turn 1+.
I had to change the fight scene code a little to make it check condition before your turn
Unless you (or one of your plugins) already changed something, a Turn 0 troop event is before your turn. As caethyril said above, I, too, have used this just fine in my game.
But glad you got it working.
But glad you got it working.
Original thread: https://forums.rpgmakerweb.com/threads/test-if-you-have-surprised-the-enemies-preemptive-attack.169633/