Triggering events via hidden objectives.

This tutorial explains how you can trigger events on the completion of hidden objectives.
Although this method can be used for any type of objective, for this tutorial we will use Type 1: 'Steal an Object'.

In this tutorial, we'll create a system where a door will automatically open when approached by the player, but only if he is carrying a KeeperMedal (-4429).

The first thing to do is to create a scenario where this will make sense.
Create two rooms with a doorway between them. Put some form of door in the doorway, and place a BoundsTrigger (-2086) at the same location as the door.

Add the FrobInert (-1629) metaproperty to the door - we don't want the player to be able to open it normally.

To achieve our effect, we are going to use an invisible goal, so the first thingto do is to set one up.
Type the following items into DromEd's console:

Console command to enter Description
quest_create_mis goal_type_20, 1 // Set the type to 'Steal An Object'
quest_create_mis goal_visible_20, 0 // Make the goal invisible
quest_create_mis goal_target_20, -4429 // Set the targat to KeeperMedal (-4429)
quest_create_mis goal_state_20, 0 // Set the state to 0 (Uncompleted)

Even though this goal is invisible, it will still be marked as completed when the player is carrying a KeeperMedal (-4429), and set back to incompleted when the player is no longer carrying one.
Invisible objectives do not need to be completed to finish the mission.

To trigger an event when the objective is completed, we need to create a QuestVarTrigger (-4370), and set up its Trap->Quest Var property as follows:

=1:goal_state_20

Make sure you enter that in verbatim, or it won't work.

Now, create a RequireAllTrap (-2649), add a ControlDevice link from the QuestVarTrigger (-4370) to the RequireAllTrap (-2649), from the BoundsTrigger (-2086) to the RequireAllTrap (-2649), and from the RequireAllTrap (-2649) to the door.

Finally, create a KeeperMedal (-4429) on the side of the door that the player starts on.

That should do it.

You can also use this effect to trigger events via the other types of objective ('Kill a Creature', 'Go to a Location', 'Steal a Certain Amount of Loot'), and also with reversed goals.
Also remember that there is a maximum number of objectives that a single mission can have. I think that this number is a mere 21 (0-20), but I don't know for sure.