"You Cannot Go That Way Yet"

In my game, there's a castle connected to a city. They're both in different maps.

I don't want players going into the castle until they have completed a certain event in the game. The only problem is, I don't know how. 

I need, once you have completed a certain task, for the barrier to disappear so you are allowed to pass into the castle.

Any help?

Thanks in advance,

A
As part of the "certain event" include setting a named control switch when that event is completed (e.g. Bird Boss dead and it's switch #24)

For your barrier you will need a 2 page event.

The first page will have your barrier.

Second page, have as a condition (top left corner) Switch #24 ON

do whatever you need to remove the barrier (change the graphic or whatever state you'd set up on page one)

then when Bird Boss dies, the switch goes on and the second page of your barrier event becomes active.

As this is a very simple event, could I suggest that you have a look at Andar's excellent collection of useful info, tutorials etc for those just starting.  You will save yourself a lot of time and frustration if you have a look at it now as it will answer most, if not all, of the questions that inevitably come up at the beginning.  You can find it here http://forums.rpgmakerweb.com/index.php?/topic/14727-a-starting-point-for-new-users-v08/?hl=+starting%20+point%20+users
Thanks much.
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/you-cannot-go-that-way-yet.22664/