Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Scare Sound?
zergling50 Offline
Member

Posts: 74
Threads: 9
Joined: Jul 2012
Reputation: 1
#17
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!
07-19-2012, 04:47 PM
Find


Messages In This Thread
Scare Sound? - by zergling50 - 07-18-2012, 09:12 PM
RE: Scare Sound? - by Kazakarumariou - 07-18-2012, 09:20 PM
RE: Scare Sound? - by zergling50 - 07-18-2012, 10:03 PM
RE: Scare Sound? - by Adny - 07-18-2012, 10:14 PM
RE: Scare Sound? - by zergling50 - 07-18-2012, 10:16 PM
RE: Scare Sound? - by Kazakarumariou - 07-18-2012, 11:16 PM
RE: Scare Sound? - by Adny - 07-18-2012, 11:34 PM
RE: Scare Sound? - by Adny - 07-18-2012, 10:22 PM
RE: Scare Sound? - by zergling50 - 07-18-2012, 11:51 PM
RE: Scare Sound? - by Adny - 07-19-2012, 12:10 AM
RE: Scare Sound? - by zergling50 - 07-19-2012, 12:25 AM
RE: Scare Sound? - by Adny - 07-19-2012, 12:31 AM
RE: Scare Sound? - by zergling50 - 07-19-2012, 12:40 AM
RE: Scare Sound? - by Streetboat - 07-19-2012, 12:32 AM
RE: Scare Sound? - by Adny - 07-19-2012, 12:45 AM
RE: Scare Sound? - by zergling50 - 07-19-2012, 01:05 AM
RE: Scare Sound? - by zergling50 - 07-19-2012, 04:47 PM
RE: Scare Sound? - by zergling50 - 07-20-2012, 08:07 PM
RE: Scare Sound? - by Kazakarumariou - 07-20-2012, 08:38 PM
RE: Scare Sound? - by zergling50 - 07-20-2012, 10:04 PM
RE: Scare Sound? - by Kazakarumariou - 07-21-2012, 07:23 PM
RE: Scare Sound? - by zergling50 - 07-22-2012, 05:06 PM



Users browsing this thread: 1 Guest(s)