It looks like your emulating the earthball.c code in lite-c, in which case that code should help you solve any movement problems. As for ending your game, you should check your manual.
Your code can be taken directly from the manual, attach something like the following to your doorway.
Code:
action exploding_barrel()
{
my.ENABLE_IMPACT = ON; // sensible for push collision
my.emask |= ENABLE_IMPACT;
my.event = bounce_event;
...
}
Then have another function bounce_event that does what you want (end the game, ect.)
Code:
function bounce_event()
{
if (event_type == EVENT_IMPACT)
{
ent_playsound(my,explode,50);
set(predefinedPanelOrBmap, VISIBLE);
//If you want more...
level_load("newLevel.wmb");
// Wait a second, then remove the panel/text.
wait(-1);
reset(predefinedPanelOrBmap, VISIBLE);
}
}
In retrospect you should probably attach the collision detection to the door that way the first time you hit a wall with the ball you don't set of the event and reset the level each time ;0