I'm looking for a way to trigger events based on the specific enemy the actor is currently attacking.
For example, if Hero 1 is fighting both a Dragon and a Slime, and he attacks the Dragon, I'd like a specific event to occur. But if he attacks the Slime, even with the same attack he used on the Dragon, I'd like a different event to occur.
For single-enemy troops, this is easy enough to do. Just set a skill calling a common event that itself relies on a conditional branch set by a switch. That switch can be turned on/off in the troop's battle event, and there are plugins that can allow it to be turned on/off at the end of the battle so that it resets for the next battle, where it can change if the troop changes. But that's only useful if you have just one enemy type per troop to worry about. What I'm trying to do is make it so that you can do it with a mixed-enemy troop.
To give you a more concrete example, I want to do this so that I can display different pictures (using show picture commands) depending on the enemy type attacked. So in the above example, I want to make sure the pictures I'm using for when Hero 1 attacks the Dragon are not the same as the ones that show up when he attacks the Slime in the same battle, and vice-versa.
Can this be done either via plugins or eventing? Maybe a way to flag the enemy such that when it's hit, it either toggles a switch or sets a variable to a certain value, and that switch or variable triggers the appropriate picture to appear? Thanks in advance for any assistance, and let me know if you need more information.
For example, if Hero 1 is fighting both a Dragon and a Slime, and he attacks the Dragon, I'd like a specific event to occur. But if he attacks the Slime, even with the same attack he used on the Dragon, I'd like a different event to occur.
For single-enemy troops, this is easy enough to do. Just set a skill calling a common event that itself relies on a conditional branch set by a switch. That switch can be turned on/off in the troop's battle event, and there are plugins that can allow it to be turned on/off at the end of the battle so that it resets for the next battle, where it can change if the troop changes. But that's only useful if you have just one enemy type per troop to worry about. What I'm trying to do is make it so that you can do it with a mixed-enemy troop.
To give you a more concrete example, I want to do this so that I can display different pictures (using show picture commands) depending on the enemy type attacked. So in the above example, I want to make sure the pictures I'm using for when Hero 1 attacks the Dragon are not the same as the ones that show up when he attacks the Slime in the same battle, and vice-versa.
Can this be done either via plugins or eventing? Maybe a way to flag the enemy such that when it's hit, it either toggles a switch or sets a variable to a certain value, and that switch or variable triggers the appropriate picture to appear? Thanks in advance for any assistance, and let me know if you need more information.