Advertisement
Guest User

Untitled

a guest
May 25th, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 4.41 KB | None | 0 0
  1. //////WAKE UP////////
  2.  
  3. void wakeUp()
  4. {
  5.     SetSanityDrainDisabled(true);
  6.     FadeOut(0);    
  7.     FadeIn(6);  
  8.     FadeImageTrailTo(2, 2);
  9.     FadeSepiaColorTo(100, 4);
  10.     SetPlayerActive(false);    
  11.     FadePlayerRollTo(50, 220, 220);  
  12.     FadeRadialBlurTo(0.15, 2);
  13.     SetPlayerCrouching(true);            
  14.     AddTimer("trig1", 8.0f, "beginStory");    
  15. }
  16.  
  17. void beginStory(string &in asTimer)
  18. {
  19.     ChangePlayerStateToNormal();
  20.    // SetPlayerActive(true);
  21.     FadePlayerRollTo(0, 33, 33);        
  22.     FadeRadialBlurTo(0.0, 1);
  23.     FadeSepiaColorTo(0, 4);
  24.     SetPlayerCrouching(false);
  25.     FadeImageTrailTo(0,1);
  26.     PlayGuiSound("react_sigh1", 1.0f);
  27.     AddTimer("trig2", 0.0f, "scene");    
  28. }
  29.  
  30. void scene(string &in asTimer)
  31. {
  32.     PlayGuiSound("react_scare1", 1.0f);
  33.     StartPlayerLookAt("alodar_line_1", 0.5, 0.5, "");
  34.     SetEntityActive("warden_placeholder_1", true);
  35.     for(int i=1;i<=14;i++)
  36.     {
  37.         AddEnemyPatrolNode("warden_placeholder_1", "PathNodeArea_"+i, 0.01f, "");
  38.     }  
  39.     AddTimer("trig3", 2.4f, "look_change");    
  40. }
  41.  
  42. void look_change(string &in asTimer)
  43. {
  44.     PlayGuiSound("react_scare3", 1.0f);
  45.     StartPlayerLookAt("alodar_line_2", 0.5, 0.5, "");    
  46. }
  47.  
  48. /////////////////////////////
  49.  
  50. //////////BEGIN CRUSHING SEQUENCE/////////
  51.  
  52. void alodar_talk1(string &in asParent, string &in asChild, int alState)
  53. {
  54.     //SetPlayerActive(false);
  55.     PlayGuiSound("react_pant2", 1.0f);
  56.     StartPlayerLookAt("warden_placeholder_1", 2, 2, "");
  57.     //AddTimer("change_look", 4.0f, "look_at_golem");
  58.     AddEffectVoice("placeholder", "", "Dialogues", "CH01L07_Alodar_1", false, "Player", 5.0f, 100.0f);
  59.     AddEffectVoice("placeholder", "", "Dialogues", "CH01L07_Alodar_2", false, "Player", 5.0f, 100.0f);
  60.     AddEffectVoice("placeholder", "", "Dialogues", "CH01L07_Alodar_3", false, "Player", 5.0f, 100.0f);
  61.     AddEffectVoice("placeholder", "", "Dialogues", "CH01L07_Alodar_4", false, "Player", 5.0f, 100.0f);
  62.     AddEffectVoice("placeholder", "", "Dialogues", "CH01L07_Alodar_5", false, "Player", 5.0f, 100.0f);
  63.     AddEffectVoice("placeholder", "", "Dialogues", "CH01L07_Alodar_6", false, "Player", 5.0f, 100.0f);
  64.    
  65.     SetEffectVoiceOverCallback("crush_begin");
  66. }
  67.  
  68. ///////////////////////////////////
  69.  
  70. /////////CRUSHING EVENT BEGIN////////
  71.  
  72. void crush_begin()
  73. {
  74.     PlayGuiSound("react_scare3", 1.0f);
  75.     SetPlayerActive(true);
  76.     StopPlayerLookAt();
  77.    
  78.     //SetEntityActive("warden_placeholder_1", true);
  79.     for(int i=1;i<=9;i++)
  80.     {
  81.         AddEnemyPatrolNode("warden_placeholder_1", "go_away_"+i, 0.01f, "");
  82.     }  
  83.    
  84.     PlayMusic("29_amb02.ogg", true, 1, 3, 1, true);
  85.    
  86.     PlayGuiSound("27_break", 0.2f);
  87.     PlaySoundAtEntity("wheelf", "L04_wheel", "spinning_cogwheel_script_3", 16.0f, false);
  88.     PlaySoundAtEntity("shoof", "scrape_rock.snt", "Player", 10.0f, false);
  89.    
  90.     RotatePropToSpeed("spinning_cogwheel_script_1", 0.1f, 3.1416f, 0, 0, 1, false, "");
  91.     RotatePropToSpeed("spinning_cogwheel_script_2", 0.1f, 3.1416f, 0, 0, -1, false, "");
  92.     RotatePropToSpeed("spinning_cogwheel_script_3", 0.1f, 3.1416f, 0, 0, 1, false, "");
  93.     RotatePropToSpeed("spinning_cogwheel_script_4", 0.1f, 3.1416f, 0, 0, -1, false, "");
  94.     RotatePropToSpeed("spinning_cogwheel_script_5", 0.1f, 3.1416f, 0, 0, 1, false, "");
  95.    
  96.     //SetMoveObjectStateExt("crush_wall_1", 0, 0.1f, 0.1f, 0.05f, false);
  97.     //SetMoveObjectStateExt("crush_wall_2", 0.98f, 0.1f, 0.055f, 0.05f, false);
  98.    
  99.     SetMoveObjectStateExt("crush_wall_1", 0.15f, 0.05f, 0.05f, 0.0f, false);
  100.     SetMoveObjectStateExt("crush_wall_2", 0.15f, 0.05f, 0.05f, 0.0f, false);
  101.    
  102.     //SetMoveObjectState("crush_wall_1", -1);
  103.     //SetMoveObjectState("crush_wall_1", 1);
  104. }
  105.  
  106. void die(string &in asParent, string &in asChild, int alState)
  107. {
  108.     SetPlayerActive(false);
  109.     GivePlayerDamage(20, "BloodSplat", false, false);
  110.     AddPlayerHealth(-200);
  111.     FadeOut(0.5f);
  112.     PlayGuiSound("ch01l07_crushed", 0.2f);
  113. }
  114.  
  115. void ResetWallChase(string &in asName, int alCount)
  116. {
  117.     for(int i=1; i<=2; ++i) ResetProp("crush_wall_"+i);
  118.     SetPlayerActive(true);
  119.     crush_begin();
  120. }
  121.  
  122. /////////////////////////////////////
  123.  
  124. void OnStart()
  125. {
  126.     /////AMB build up
  127.     PlayMusic("23_amb.ogg", true, 1, 3, 0, true);
  128.     /////crushing chamber talk
  129.     AddEntityCollideCallback("warden_placeholder_1", "alodar_line_1", "alodar_talk1", true, 1);
  130.     AddEntityCollideCallback("crush_wall_*", "death_1", "die", true, 1);
  131.     /////map config
  132.     AutoSave();
  133.     CheckPoint("save_cells_redux_01", "PlayerStartArea_1", "", "Hints", "Lever");
  134.     SetMapDisplayNameEntry("cells");
  135.     /////wake up
  136.     wakeUp();
  137. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement