Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void OnStart()
- {
- FadeOut(0);
- FadeIn(3);
- TimerShake("");
- TimerShakeLamp("");
- SetMoveObjectStateExt("elevator_wall01_1", -1, 2, 1, 0.2, true);
- CreateParticleSystemAtEntity("scrape1", "ps_elevator_slow.ps", "AreaScrape_1", false);
- CreateParticleSystemAtEntity("scrape2", "ps_elevator_slow.ps", "AreaScrape_2", false);
- PlaySoundAtEntity("scrape1", "14_scrape_low.snt", "AreaScrape_1", 5, false);
- PlaySoundAtEntity("scrape2", "14_scrape_low.snt", "AreaScrape_2", 5, false);
- PlaySoundAtEntity("MoveSound", "elevator_move_normal", "AreaEffect", 1, true);
- AddTimer("", 38, "TimerEndElevator");
- AddTimer("", 10, "TimerStopElevator");
- AddTimer("", 18, "TimerResumeElevator");
- }
- void TimerResumeElevator(string &in asTimer)
- {
- SetMoveObjectStateExt("elevator_wall01_1", -1, 2, 1, 0.2, true);
- PlaySoundAtEntity("MoveSound", "elevator_move_normal", "AreaEffect", 1, true);
- CreateParticleSystemAtEntity("scrape1", "ps_elevator_slow.ps", "AreaScrape_1", false);
- CreateParticleSystemAtEntity("scrape2", "ps_elevator_slow.ps", "AreaScrape_2", false);
- PlaySoundAtEntity("scrape1", "14_scrape_low.snt", "AreaScrape_1", 5, false);
- PlaySoundAtEntity("scrape2", "14_scrape_low.snt", "AreaScrape_2", 5, false);
- SetLightVisible("LightScrape_1", true);
- SetLightVisible("LightScrape_2", true);
- TimerShake("");
- TimerShakeLamp("");
- }
- void TimerStopElevator(string &in asTimer)
- {
- SetMoveObjectStateExt("elevator_wall01_1", -1, 2, 0, 0.2, true);
- PlaySoundAtEntity("", "elevator_stop", "AreaEffect", 0, false);
- DestroyParticleSystem("scrape1");
- DestroyParticleSystem("scrape2");
- StopSound("scrape1", 0.1);
- StopSound("scrape2", 0.1);
- SetLightVisible("LightScrape_1", false);
- SetLightVisible("LightScrape_2", false);
- RemoveTimer("shake");
- RemoveTimer("shakelamp");
- GiveSanityDamage(20, true);
- StartScreenShake(0.1, 1, 0, 0);
- StopSound("MoveSound", 0.2);
- AddTimer("scare", 1, "TimerPlayerReact");
- AddTimer("breath", 2.5, "TimerPlayerReact");
- AddTimer("breath", 4.5, "TimerPlayerReact");
- }
- void TimerPlayerReact(string &in asTimer)
- {
- PlayGuiSound("react_" + asTimer, 0.6);
- }
- void TimerShake(string &in asTimer)
- {
- StartScreenShake(0.01, 2, 0, 0);
- AddTimer("shake", 2, "TimerShake");
- }
- void TimerShakeLamp(string &in asTimer)
- {
- AddPropImpulse("elevator_lamp_1", RandFloat(0.7, 1.3), 0, 0, "world");
- AddTimer("shakelamp", RandFloat(0.6, 1.9), "TimerShakeLamp");
- }
- void TimerEndElevator(string &in asTimer)
- {
- FadeOut(1);
- AddTimer("", 1, "EndMap");
- }
- void EndMap(string &in asTimer)
- {
- ChangeMap("Level1.map", "", "", "");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement