Let me explain myself, I made a weird ''Spell'' called that I called Dummy, this spell adds a companion to the team, called Dummy, so it is the focus of the enemy attacks.
The problem is, I want it to leave at the end of the battle, and I don't know what to do, could someone help me?
'MV School' is where people post 'lessons' to help others use MV. It is not for asking questions.
If you want help to implement a script, people need to be able to see that script. Please edit your post to include it. Use the 'Code' function which you will find in the drop down menu of the Insert icon on the tool bar of the reply box. If you don't the forum software will mess up your code, including turning some of it into smilies.
Moved to: Javascript/Plugin Support
Moved to: MV Support
"how-to" question belongs in the support area, the MV School is a specific event/project on the forum.
For a troop event to run at the end of battle, you'll either need a plugin that adds more triggers to the battlesystem, or you'll need to get tricky with all enemies having an immortal state and one event per enemy checking if its the last enemy and then triggering the leave.
The plugin is the better solution here, and such plugins already exist...
EDIT: Ninja'd
So if I'm guessing this right. your spell "Dummy" adds a party member to your party that enemies target and when the said battle is done you want the dummy removed?
Assuming your battles are the default every few steps is a random encounter then you can set up a parrel event on the same map that removes the "Dummy" party member.
Also to stop if repeating you could set it as a conditional branch to only work IF the dummy is in your party.
So this could be done with events.