Create a trigger with the condition as the condition you want fro ending the mission and change the trigger type to any of the "end" types.
There's a lot more to do with the debriefing and outros, etc.
Does anyone have the prima quick guide handy. It will be much clearer than I can be!