Advertisement
Mudbill

Intro/Outro Script (Amnesia)

May 8th, 2013
1,247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. void OnStart()
  2. {
  3. TeleportPlayer("Intro_0");
  4. FadeOut(0);
  5. SetPlayerActive(false);
  6. SetSanityDrainDisabled(true);
  7. ShowPlayerCrossHairIcons(false);
  8.  
  9. AddTimer("fadein", 3, "TimerIntroOutro");
  10.  
  11. PlayMusic("in_motion.ogg", false, 1, 0, 1, true);
  12. }
  13.  
  14. void TimerIntroOutro(string &in asTimer)
  15. {
  16. if(GetLocalVarInt("Intro") < 3) {
  17.  
  18. if(asTimer == "fadein") {
  19. TeleportPlayer("Intro_" + GetLocalVarInt("Intro"));
  20. FadeIn(1);
  21. AddTimer("fadeout", 4, "TimerIntroOutro");
  22. }
  23.  
  24. if(asTimer == "fadeout") {
  25. FadeOut(1);
  26. AddTimer("fadein", 1, "TimerIntroOutro");
  27. AddLocalVarInt("Intro", 1);
  28. }
  29. }
  30. else
  31. {
  32. TeleportPlayer("Spawn");
  33. FadeIn(2);
  34. SetPlayerActive(true);
  35. SetSanityDrainDisabled(false);
  36. ShowPlayerCrossHairIcons(true);
  37.  
  38. PlayMusic("in_motion.ogg", false, 0.2, 1, 2, true);
  39. }
  40.  
  41. if(asTimer == "outro") {
  42. StartCredits("in_motion.ogg", false, "Credits", "Ending", 3);
  43. }
  44. }
  45.  
  46. void Exit(string &in asEntity)
  47. {
  48. AddTimer("outro", 0.01, "TimerIntroOutro");
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement