To connect a script to a level, you must first open the level's properties and assign the script through the dialog box you see on the first tab. Then, you must open your entity's properties and assign your action to the wizard under the behavior panel.