//////////////////////
//BEGIN ROOM OF GIRL//
/*Turn of lantern and do effect when entering room with altar lamp
*/
void CollideLightsOut(string &in asParent, string &in asChild, int alState)
{
SetLanternActive(false, true);
SetLanternDisabled(true);
PlaySoundAtEntity("eek", "scare_whine_loop3", "Player", 0.5f, false);
PlaySoundAtEntity("screaaaam", "12_girl_scream.snt", "Player", 1.0f, false);
StartScreenShake(0.5f, 0.01f, 0.1f, 0.02f);
PlayMusic("12_event_blood.ogg", false, 1.0f, 0.0f, 10, true);
CreateParticleSystemAtEntity("petals1", "ps_rose_petals.ps", "AreaPedals_1", false);
RemoveTimer("TimerGirlCry");
AddTimer("lights1", 0.05, "TimerLightsOut");
AddTimer("lights2", 0.2, "TimerLightsOut");
AddTimer("lights3", 0.6, "TimerLightsOut");
AddTimer("lights4", 1.2, "TimerLightsOut");
AddTimer("lights5", 1.5, "TimerLightsOut");
AddTimer("lights6", 2.5, "TimerLightsOut");
AddTimer("lightssps", 4.0, "TimerLightsOut");
AddTimer("lightsq", 10, "TimerLightsOut");
}
/*Shake, show blood, scream for the event
*/
void TimerLightsOut(string &in asTimer)
{
if(asTimer == "lights1"){
CreateParticleSystemAtEntity("petals2", "ps_rose_petals.ps", "AreaPedals_2", false);
StartPlayerLookAt("AreaLightsOut", 2.0f, 2.0f, "");
MovePlayerHeadPos(0.0f, -1.0f, 0.0f, 0.5f, 0.5f);
GiveSanityDamage(20.f, false);
FadeRadialBlurTo(0.1f, 0.025f);
SetRadialBlurStartDist(0.2f);
SetLampLit("altar_lamp_1", true, true);
PlaySoundAtEntity("thunmp", "scare_thump_flash", "Player", 0.0f, false);
}
else if(asTimer == "lights2"){
CreateParticleSystemAtEntity("petals3", "ps_rose_petals.ps", "AreaPedals_3", false);
CreateParticleSystemAtEntity("petals31", "ps_rose_petals.ps", "AreaPedals_1", false);
SetLanternDisabled(false);
PlaySoundAtEntity("thunmp", "scare_tingeling", "Player", 0.0f, false);
StartScreenShake(0.7f, 0.1f, 0.05f, 0.02f);
StopMusic(8.0f, 10);
}
else if(asTimer == "lights3"){
CreateParticleSystemAtEntity("petals4", "ps_rose_petals.ps", "AreaPedals_4", false);
PlaySoundAtEntity("scare1", "react_scare", "Player", 0.5f, false);
StartScreenShake(1.0f, 0.01f, 0.05f, 0.1f);
}
else if(asTimer == "lights4"){
CreateParticleSystemAtEntity("petals5", "ps_rose_petals.ps", "AreaPedals_2", false);
PlaySoundAtEntity("creak", "00_creak", "Player", 2, false);
StartScreenShake(0.3f, 0.01f, 0.05f, 0.02f);
MovePlayerHeadPos(0.0f, 0.0f, 0.0f, 0.2f, 0.2f);
}
else if(asTimer == "lights5"){
CreateParticleSystemAtEntity("petals41", "ps_rose_petals.ps", "AreaPedals_4", false);
StartScreenShake(0.7f, 0.02f, 0.05f, 0.05f);
PlaySoundAtEntity("scare2", "react_scare", "Player", 0.75f, false);
}
else if(asTimer == "lights6"){
StartScreenShake(0.7f, 0.02f, 0.05f, 0.05f);
PlaySoundAtEntity("scare1", "react_scare", "Player", 0.5f, false);
FadeSepiaColorTo(0, 0.1f);
FadeRadialBlurTo(0, 0.1f);
StopPlayerLookAt();
StopSound("eek", 1.0f);
}
else if(asTimer == "lightssps"){
for(int i=1;i<=2;i++) DestroyParticleSystem("BloodParticle_"+i);
for(int i=1;i<=4;i++) StopSound("BloodSound_"+i, 0.0f);
StopSound("creak", 4.0f);
}
//else if(asTimer == "lightsq"){ CompleteQuest("12Trail","12Trail");}
}
void InteractCloth(string &in asEntity)
{
PlayGuiSound("12_cloth.snt", 0.9f);
//AddTimer(asEntity, 1.0f, "TimerClothOn");
//if(GetLocalVarInt("TouchedCloth") == 1) return;
StartEffectEmotionFlash("Ch01Level12", "SignGirlCloth", "ui_insanity_touch.snt");
//SetLocalVarInt("TouchedCloth", 1);
//SetMessage("Ch01Level12", "SignGirlCloth", 0);
}
void TimerClothOn(string &in asTimer)
{
SetEntityPlayerInteractCallback(asTimer, "InteractCloth", true);
}
//END ROOM OF GIRL//
////////////////////
Tell me how this works.