I don't get how to use Common Events.

So I know the idea of common events, but I'm having a damnable time trying to figure out how to implement it.

The goal is to beat a boss and as you leave the area the boss stops you and joins your team. The problem is, I don't know how to use the common event in conjunction with the conditional branch, so that way they boss only joins you when you have beat them.

Edit: You leave a mountain area, so you leave the way you came so I need it to not trigger when you walk over it, unless the boss has been beaten.
I think you may have misunderstood what common events are for. The point of them is that they can be executed from anywhere in the game without being tied to a map. For something like a boss joining you after you beat them in battle, that sounds like it'd be a regular map event.
I think you may have misunderstood what common events are for. The point of them is that they can be executed from anywhere in the game without being tied to a map. For something like a boss joining you after you beat them in battle, that sounds like it'd be a regular map event.
That makes sense to me, the problem is you beat them at the summit of the map, then you have to travel all the way back down and they join you just as you leave. I figured that it would be easiest to set a CE withing the CB so that it will trigger when you leave. If not maybe place a CE within the boss fight to tell the event in the CB that the boss has been beaten.

Edit: You go in and out of the mountain a number of times, so I figured a CE would allow me to bypass anything that would have to be restarted at the summit. The only easy thing I can think to do, is create a Key item so that the CB event knows to add them, and not use a CE at all. But, I would like to get better at RMMV so I can complete this game competently.
I figured that it would be easiest to set a CE withing the CB so that it will trigger when you leave.
wrong, the easiest way would be to add a conditional branch to the transfer event checking if the boss is deafeated (set a switch for that) and add the new actor in the transfer event if yes
That makes sense to me, the problem is you beat them at the summit of the map, then you have to travel all the way back down and they join you just as you leave. I figured that it would be easiest to set a CE withing the CB so that it will trigger when you leave. If not maybe place a CE within the boss fight to tell the event in the CB that the boss has been beaten.

Edit: You go in and out of the mountain a number of times, so I figured a CE would allow me to bypass anything that would have to be restarted at the summit. The only easy thing I can think to do, is create a Key item so that the CB event knows to add them, and not use a CE at all. But, I would like to get better at RMMV so I can complete this game competently.
As said before, you wont need a CE at all here, you can achieve all this through normal events as good if not better, you can process the whole event with a variable, lets say if variable = 0 (boss fight), when you defeat him you get +1 of the same variable and call it like that, if variable =1 (boss joins) and so on... you can also use switches, self switches to stop events from happening again...
Or you can also add after the boss fight a switch to turn on and another event of that map turns on to autorun, or parallel and just adds the boss... or another solution and i suspect you do the bossfight manually via event, you can add a if win in the event and do there things... could look something like this:
1650324159435.png
@Cawkmage you allready noticed the conditional Branch Eventcommand, but that is only half the Magic, the other part is values, or in our case changeble safeable values.
rpg maker got switches for that, they got 2 values, off or on or in other words 0 or 1.
Variables are like Switches but they can have more than 2 values, for example a number from -999999999 to 999999999999 and more. Some people even use Variables to store Words in them instead of Numbers.

So when you defeat the Boss you could turn a Switch to ON,
than in the Event which happens when you leave the Mountain, you use that Switch for your conditional branch Event command. If its ON, than the Boss is defeated, else you did not defeat the Boss.
Thank you all, there seems to be a bit of choices I have here. So, I'll figure the best one for me. I made the outside of the mountain a single tall map so hopefully that makes this process easier. I really appreciate the help.
@Cawkmage you allready noticed the conditional Branch Eventcommand, but that is only half the Magic, the other part is values, or in our case changeble safeable values.
rpg maker got switches for that, they got 2 values, on or off or in other words 0 or 1.
Variables are like Switches but the can have more than 2 values, for example a number from -999999999 to 999999999999 and more. Some people even use Variables to store Words in them instead of Numbers.

So when you defeat the Boss you could turn a Switch to ON,
than in the Event which happens when you leave the Mountain, you use that Switch for your conditional branch Event command. If its ON, than the Boss is defeated, else you did not defeat the Boss.

Ah see that's what I was trying to figure out then wrongly assumed it would be best to implement a CE, within the battle to tell a switch to turn on. But are you saying a switch could be linked to the overall map from the battle screen or after the fight ends back in the main map a switch to turn on and trigger an event at a specific event square?
As said before, you wont need a CE at all here, you can achieve all this through normal events as good if not better, you can process the whole event with a variable, lets say if variable = 0 (boss fight), when you defeat him you get +1 of the same variable and call it like that, if variable =1 (boss joins) and so on... you can also use switches, self switches to stop events from happening again...
Or you can also add after the boss fight a switch to turn on and another event of that map turns on to autorun, or parallel and just adds the boss... or another solution and i suspect you do the bossfight manually via event, you can add a if win in the event and do there things... could look something like this: View attachment 223578

Right but wouldn't that create an encounter where you stood? By the time the character decides to join the player's team you have already left the battle and worked your way down the mountain to a few steps from the exit.
Self Switches are only for inside the same Map Event and every Event got its own 4 Self Switches.

Normal Game Switches and Variables are called Global, they are like Containers to dump stuff into, which you than later on use in your conditions, no matter on which Map you are.
Just as a note, we're not supposed to post multiple times in a row. You can use the Edit, Reply, +Quote and @Username controls to do whatever you want within one post.
Ah see that's what I was trying to figure out then wrongly assumed it would be best to implement a CE, within the battle to tell a switch to turn on.
It really sounds like you could benefit from doing a few more basic tutorials on the various kinds of events - you seem to misunderstand what a common event is and does.

For example, here, if you have a troop event, why on earth would you call a common event from inside of that just to turn a switch on? Simply put the Control Switches command in that troop event.
But are you saying a switch could be linked to the overall map from the battle screen or after the fight ends back in the main map a switch to turn on and trigger an event at a specific event square?
A switch is a switch - if you turn it on or off in one event, it stays that way inside your game until you change it. It doesn't get "linked" to anything.

So implementing this is very simple. You give your boss a troop event with the condition Turn 0 and the span of Battle. Use the Control Switches command to turn on a switch of your choice.

Then in the event you step on to transfer map out of your mountain, edit it to add a Conditional Branch -> that switch is ON. Inside of the branch, do the Change Party Members command.

You'd probably want to then set a self-switch on that event and make a second page with the condition of that self-switch that only has the transfer player command - that will prevent any odd behavior from trying to add the party member again if you go back that way.

There are two reasons to use a common event for something.
1 - It's something you use commonly. You can call a common event so you don't need to keep typing out the code in different places.

2 - It's something you can't use another kind of event for. For example, skills and items can call a common event when you use them, there's no way to make a map or troop event that would trigger off of that.
Right but wouldn't that create an encounter where you stood? By the time the character decides to join the player's team you have already left the battle and worked your way down the mountain to a few steps from the exit.
Dunno if you want this but here:
1650400931417.png

1650400967744.png

1650400986292.png

_________________________________________________________________________________

1650401024533.png

1650401049120.png


And this is how it would look then:


I forgot to show, if you go back to the map where the monster was, there wont be anything there anymore, since all events will be on the blank page with variable 0001 set to 2 condition.

You need to tweak it to your liking ofc, add sounds ect... but thats the gist of it, no CommonEvent required as you see...

Original thread: https://forums.rpgmakerweb.com/threads/i-dont-get-how-to-use-common-events.146883/