In your OnStart() function you add
SetEntityPlayerInteractCallback("name_of_door_here", "FunctionToCall", true);
Then make the callback function:
void FunctionToCall(string &in entity)
{
PlaySoundAtEntity("instance_name", "soundfile.ogg/snt", "name_of_entity_to_play_sound_from", 0, false);
SetEntityActive("name_of_grunt_or_brute", true); //Spawn monster
}
Edit: For the camera effect, you could simply use
void GiveSanityDamage(float afAmount, bool abUseEffect);
Which will "bend" the camera little".
Example:
void FunctionToCall(string &in entity)
{
PlaySoundAtEntity("instance_name", "soundfile.ogg/snt", "name_of_entity_to_play_sound_from", 0, false);
SetEntityActive("name_of_grunt_or_brute", true); //Spawn monster
GiveSanityDamage(15.0f, true);
}
I've written a small function for you, that should give a more twisted camera effect:
void DoScaryCamera(float afSanityDamage)
{
//Enable image trail
FadeImageTrailTo(1.0f, 10.0f);
//Enable radial blur
FadeRadialBlurTo(0.15f, 10.0f);
//If the function was called with a sanity damage larger than 0, apply it (with effects)
if(afSanityDamage > 0.0f)
GiveSanityDamage(afSanityDamage, true);
//End the effects, half a second later
AddTimer("", 0.5f, "TimerEndEffects");
}
void TimerEndEffects(string &in asTimer)
{
//Disable image trail
FadeRadialBlurTo(0.0f, 0.5f);
//Disable radial blur
FadeImageTrailTo(0.0f, 1.0f);
}
Simply add that to your script file, and simply do DoScaryCamera(15.0f) from anywhere in your code, to perform a little twisting camera effect. 15.0f being the sanity damage to apply.
Haven't tested it as I just wrote it here, but it should work just fine.