As the title suggests, I would like to include such a skill in my game. The gimmick of the character who uses it is that she has the ability to mimic people. This skill would be like Mirror Move in Pokemon.
How to make a skill that lets you copy the enemy's last used skill
RPG Maker MZ SupportSo this is mostly pretty easily done.
You can make the skill call a common event which uses Control Variables to store (in Game Data) the last used skill ID.
The only trick after that is the Force Action event command requires you to specify a skill ID, you can't just use that variable.
So you have to use the script call of it:
This is all presuming you are making a Pokémon-style game and have only one actor in your party. If you have others in your party who might be taking turns between the enemy and this character, it gets more complicated and will need a plugin.
You can make the skill call a common event which uses Control Variables to store (in Game Data) the last used skill ID.
The only trick after that is the Force Action event command requires you to specify a skill ID, you can't just use that variable.
So you have to use the script call of it:
Code:
$gameParty.members()[0].forceAction($gameVariables.value(42), -1);
BattleManager.forceAction($gameParty.members()[0]);
This is all presuming you are making a Pokémon-style game and have only one actor in your party. If you have others in your party who might be taking turns between the enemy and this character, it gets more complicated and will need a plugin.
Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-a-skill-that-lets-you-copy-the-enemys-last-used-skill.169462/