Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.
You need Switches, when you talk to A just make A switch become On, then on the other map just set a Event and in the first page, there is something like Switch and a Combo Box.
Put the Switch you set on A there.
Do you want the enemies to disappear after you destroy them? If so, have each enemy event do something like this:
Battle Processing:enemy
Control Variables:enemies killed += 1
Control Self Swith A is on
Then make a new event page where the conditions are set to Self Switch A is on.
The first line is the battle
The second line adds 1 to a variable that represents how many of the enemies you have killed.
The third line turns on self switch a so that the enemy disappears.
After you make your five enemy events, make a parallell process event. That says
Condtional Branch
if (the variable you have for how many enemies youve killed) == 5
then
transfer player:whereever you want
else
end
You should have said what battle system you were using. But here.
In Mr. Mos abs the Trigger comment can turn on switches, self switches, and change variables. In this case you want to turn on self switch a.
Oh, well you should have said what battle system you were using in the first place. When you make an enemy with Mr Mos abs, there is a comment where you need to put Trigger and then some numbers. You can look in the script for specifics but I think you need to do:
--Triggers :
# Trigger 0 - Will erase the event.
# Trigger 1 2 - Will turn on a switch with the ID of 2.
# Trigger 2 5 9 - Will change the Varaible's value with the ID of 5 to 9. If 9 is
# set to 0, the the Variable 5 will be added 1.
# Trigger 3 1 - Will change the local switch of the enemy to 1("A").
# 1 = A
# 2 = B
# 3 = C
# 4 = D
That was taken directly from the script itself. Read the comments.
So, In your event you want the trigger comment to say
Trigger 3 1
This will turn on self switch a when you kill it.
On the event page with the self switch a condition on it, make it parallel process and make it say change variables monsters killed += 1 then turn on self switch B and make a new event page on which the condition is Self Switch B is on.
That will make it so when you kill the event.
Self switch a will be turned on
the variable will be increased
and the event will disappear(turn on self switch b)
Here is some more info on variables with the ABS.
Trigger
then
2(tells the script that this is changing a variable)
then
2(id of of the variable you want changed)
then
1(what you want to set the variable to. If you want to increase it by one put 0 here)