I think that the error is in next code:
global enterChurch;
this.Active = false;
if(enterChurch) this.Active = true;
I'm afraid that this code will be executed only one time, when the entity is created.
You can put this code, for example, in the dialog with the other actor, when the main actor talk with the other actor and get the permision you can do this:
if the actor has permission to entry
{
enterChurch = true;
actor.Talk("Thanks for the permission");
}
else
{
enterChurch = false;
actor.Talk("Oh! Darm!");
}
And in the entity script:
on "LeftClick"
{
if(enterChurch)
{
actor.Talk("OK. Let's go!");
actor.GoToObject(this);
Game.ChangeScene("scenes\Scene7\Scene7.scene");
}
else
{
actor.Talk("Sorry! I don't have permission to enter in this scene");
}
}