Mudbill

Level Transitions (Amnesia)

Mar 10th, 2013
910
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void OnStart()
  2. {
  3. SetPlayerSanity(50);
  4. AddUseItemCallback("", "Key", "Door", "UseKeyOnDoor", true);
  5. }
  6.  
  7. void UseKeyOnDoor(string &in asItem, string &in asEntity)
  8. {
  9. SetLevelDoorLocked(asEntity, false);
  10. PlaySoundAtEntity("", "unlock_door.snt", asEntity, 0, false);
  11. RemoveItem(asItem);
  12. GiveSanityBoostSmall();
  13. }
  14.  
  15. -------------------------------------------------
  16. -----------------Second Level--------------------
  17. -------------------------------------------------
  18.  
  19. void InteractArea(string &in asEntity)
  20. {
  21. FadeOut(2);
  22. AddTimer("", 2, "LoadMap");
  23. }
  24.  
  25. void LoadMap(string &in asTimer)
  26. {
  27. ChangeMap("Level4_1.map", "Spawn", "", "");
  28. }
  29.  
  30. -------------------------------------------------
  31. -------------extra_english.lang------------------
  32. -------------------------------------------------
  33.  
  34. <CATEGORY Name="Inventory">
  35. <Entry Name="ItemName_KeyDesc">A Key</Entry>
  36. <Entry Name="ItemDesc_KeyDesc">It's for unlocking a door.</Entry>
  37. </CATEGORY>
  38.  
  39. <CATEGORY Name="Sign">
  40. <Entry Name="Door1">It's Locked.</Entry>
  41. <Entry Name="Door2">It's Blocked.</Entry>
  42. </CATEGORY>
  43.  
  44. <CATEGORY Name="Levels">
  45. <Entry Name="Door1">Orb Room</Entry>
  46. <Entry Name="Door2">Spawn Room</Entry>
  47. </CATEGORY>
RAW Paste Data