Advertisement
Guest User

FatalError

a guest
Sep 12th, 2011
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.02 KB | None | 0 0
  1. void OnStart()
  2. {  
  3.     AddTimer("tut01", 3, "Intro");
  4.     AddTimer("tut02", 40, "Timer01");
  5.    
  6.     SetEnemyIsHallucination("servant_grunt_1", true);
  7.     SetEnemyIsHallucination("servant_brute_1", true);
  8.     SetEnemyIsHallucination("enemy_suitor_1", true);
  9.    
  10.    
  11.     SetSwingDoorLocked("mansion_1", true, false);
  12.    
  13.     PlayMusic("ambience_wind_eerie.ogg", true, 0.5f, 0, 0, true);
  14.    
  15. AddEntityCollideCallback("Player" , "ScriptArea_2" , "BodyFunc2" , true , 1);
  16. }
  17. void BodyFunc2(string &in asParent , string &in asChild , int alState)
  18. {
  19. SetEntityActive("hanging_prisoner_1" , true);
  20. }
  21.  
  22. AddEntityCollideCallback("Player" , "ScriptArea_1" , "BodyFunc1" , true , 1);
  23.  
  24. void BodyFunc1(string &in asParent , string &in asChild , int alState)
  25. {
  26. int RanEve_2 = RandInt(1,3);
  27.  
  28.     if (RanEve_2 == 1)
  29.     {
  30.     SetEntityActive("corpse_male_1" , true);
  31.     }
  32.    
  33.     if (RanEve_2 == 2)
  34.     {
  35.     SetEntityActive("corpse_male_1" , true);
  36.     }
  37.    
  38.     if (RanEve_2 == 3)
  39.     {
  40.     SetEntityActive("corpse_male_1" , true);
  41.     }
  42.  
  43.  
  44.    
  45.     AddTimer("tut03", 10, "Timer02");
  46.     AddTimer("tut03", 10, "Timer03");
  47. }
  48.  
  49.  
  50. void Intro(string &in asTimer)
  51. {
  52.     SetMessage("Example", "Entry1", 0);
  53.    
  54. }
  55.  
  56. void Timer01(string &in asTimer)
  57.  
  58. {  
  59.  
  60. int RanEve_1 = RandInt(1,3);
  61.  
  62.     if (RanEve_1 == 1)
  63.     {
  64.     SetEntityActive("servant_grunt_1", true);
  65.     }
  66.    
  67.     else if (RanEve_1 == 2)
  68.     {
  69.     SetEntityActive("servant_brute_1", true);
  70.     }
  71.    
  72.     else if (RanEve_1 == 3)
  73.     {
  74.     SetEntityActive("enemy_suitor_1", true);
  75.     }
  76.    
  77.     SetEntityActive("ScriptArea_1", true);
  78.    
  79.     SetMessage("Example", "Entry2", 0);
  80.    
  81.     PlayMusic("10_event_coming.ogg", false, 1.0f, 0, 0, true);
  82.    
  83.     StartPlayerLookAt("mansion_1", 1, 1, "");
  84.    
  85.     AddTimer("tut03",2, "TimerDoneLookAt");
  86. }
  87.  
  88. void TimerDoneLookAt(string &in asTimer)
  89. {
  90.   StopPlayerLookAt();
  91. }
  92.  
  93. void Timer02 (string &in asTimer)
  94. {
  95.     ShowEnemyPlayerPosition("servant_grunt_1");
  96.     ShowEnemyPlayerPosition("servant_brute_1");
  97.     ShowEnemyPlayerPosition("enemy_suitor_1");
  98.    
  99.     SetSwingDoorLocked("mansion_1", false, false);
  100. }
  101.  
  102. void OnEnter()
  103. {
  104.  
  105. }
  106.  
  107. void OnLeave()
  108. {
  109.  
  110. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement