RE: Scare Sound?
My note is still doing the invisible thing, and for some reason I cant get the whole sound playing when a player enters an area thing to work. Heres my code:
////////////////////////////
// Run when starting map
void OnStart()
{
AddUseItemCallback("", "key_study_1", "mansion_3", "KeyOnDoor2", true);
AddUseItemCallback("", "key_tower_1", "mansion_5", "KeyOnDoor2", true);
AddUseItemCallback("", "key_torture_chamber_1", "level_hub_1", "KeyOnDoorlvl1", true);
SetEntityPlayerInteractCallback("note_paper01_3", "ScareNoise1", true);
SetEntityPlayerInteractCallback("note_paper01_4", "DisableLight", true);
SetEntityPlayerInteractCallback("key_tower_1", "ScareNoise2", true);
SetLightVisible("SpotLight_3", false);
AddEntityCollideCallback("Player", "ScriptArea_2", "ScareNoise3", true, 1);
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
void ActivateMonster(string &in asItem)
{
}
void KeyOnDoor2(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(asEntity, false, true);
PlaySoundAtEntity("", "unlock_door", asEntity, 0.0f, false);
RemoveItem(asItem);
}
void KeyOnDoorlvl1(string &in asItem, string &in asEntity)
{
SetLevelDoorLocked(asEntity, false);
PlaySoundAtEntity("", "unlock_door", asEntity, 0.0f, false);
RemoveItem(asItem);
GiveSanityBoostSmall();
}
void ScareNoise1(string &in asEntity)
{
PlaySoundAtEntity("", "scare_steps_big_custom", "Player", 0, false);
PlaySoundAtEntity("", "insanity_baby_cry_custom", "Player", 0, false);
PlaySoundAtEntity("", "insanity_imageflash01_custom", "Player", 0, false);
PlaySoundAtEntity("", "insanity_whisper_custom", "Player", 0, false);
PlaySoundAtEntity("", "scare_male_terrified_custom", "Player", 0, false);
PlaySoundAtEntity("", "scare_slam_door_custom_soft", "Player", 0, false);
AddPropImpulse("cabinet_nice_3", 0, 0, 45, "world");
SetLightVisible("SpotLight_3", true);
SetEntityActive("note_paper01_4", true);
GiveSanityDamage(35, true);
}
void DisableLight(string &in asEntity)
{
SetLightVisible("SpotLight_3", false);
}
void ScareNoise2(string &in asEntity)
{
PlaySoundAtEntity("", "scare_wall_crawl_custom", "ScriptArea_1", 0, false);
SetEntityActive("human_bone_1", true);
SetEntityActive("human_bone_2", true);
SetEntityActive("human_bone_3", true);
SetLampLit("candlestick_floor_9", false, true);
SetLampLit("candlestick_floor_8", false, true);
SetLampLit("candlestick_floor_7", false, true);
SetLampLit("candlestick_floor_6", false, true);
SetLampLit("candlestick_floor_5", false, true);
SetLampLit("candlestick_floor_4", false, true);
SetLampLit("candlestick_floor_3", false, true);
GiveSanityDamage(15, true);
}
void ScareNoise3(string &in parent, string &in child, string &in alstate)
{
PlaySoundAtEntity("", "scare_slam_door_custom", "Player", 0, false);
}
These two questions are the last two questions I will ask on this thread, and if I have any more I will post a new thread and stop bugging you guys. Sorry, just for some reason I am problem prone with this thing. And just in case you guys were wondering, these custom sound files are in a sounds folder in my custom story folder. The rest of the custom sounds work, so im pretty sure its a problem with the collision detector or something. Thanks!
|