Advertisement
Guest User

Untitled

a guest
Dec 15th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.80 KB | None | 0 0
  1. if Input.GetKey("W") > 0 or Input.GetKey("UpArrow") > 0 and canmove == true then
  2. if framecounter%40 == 0 then
  3. Player.sprite.Set("spr_f_maincharau_0")
  4. end
  5. if framecounter%40 == 11 then
  6. Player.sprite.Set("spr_f_maincharau_1")
  7. end
  8. if framecounter%40 == 22 then
  9. Player.sprite.Set("spr_f_maincharau_2")
  10. end
  11. if framecounter%40 == 33 then
  12. Player.sprite.Set("spr_f_maincharau_3")
  13. end
  14. if Map.isactive == true and Toriel.isactive == true then
  15. if Map.y == 195.5 then
  16. if Map.x >= -312.5 and Map.x <= 445 then
  17. Map.MoveTo(Map.x, Map.y + 1.5)
  18. Toriel.MoveTo(Toriel.x, Toriel.y + 1.5)
  19. end
  20. end
  21. if Map.y == -1 then
  22. if Map.x >= 520 and Map.x <= 880 then
  23. Map.MoveTo(Map.x, Map.y + 1.5)
  24. Toriel.MoveTo(Toriel.x, Toriel.y + 1.5)
  25. end
  26. end
  27. if Map.y == 33.5 then
  28. if Map.x >= 440 and Map.x <= 535 then
  29. Map.MoveTo(Map.x, Map.y + 1.5)
  30. Toriel.MoveTo(Toriel.x, Toriel.y + 1.5)
  31. end
  32. if Map.x >= 872.5 and Map.x <= 953.5 then
  33. Map.MoveTo(Map.x, Map.y + 1.5)
  34. Toriel.MoveTo(Toriel.x, Toriel.y + 1.5)
  35. end
  36. end
  37. Map.MoveTo(Map.x, Map.y - 1.5)
  38. Toriel.MoveTo(Toriel.x, Toriel.y - 1.5)
  39. if Map.y == 249.5 then
  40. if Map.x <= -193 and Map.x >= -293 then
  41. Map.MoveTo(Map.x, Map.y + 1.5)
  42. Toriel.MoveTo(Toriel.x, Toriel.y + 1.5)
  43. if Input.GetKey("Space") > 0 and spacePressed == false then
  44. if canmove == true then
  45. Player.sprite.Set("spr_f_maincharau_0")
  46. canmove = false
  47. end
  48. spacePressed = true
  49. DialogueBox = CreateSprite("UndertaleDialogueBox", "BelowPlayer")
  50. DialogueBox.x = 320
  51. DialogueBox.y = 410
  52. Text = CreateText({"Hi! afagagafafscaafwa", "How are you??"}, {240, 435}, 2000, "BelowPlayer", -1)
  53. Text.HideBubble()
  54. Text.progressmode = "manual"
  55. Text.color = {1.0, 1.0, 1.0}
  56. TorielFace = CreateSprite("spr_face_torielmadblink_0", "BelowPlayer")
  57. TorielFace.scale(2,2)
  58. TorielFace.x = 160
  59. TorielFace.y = 410
  60. DEBUG("Hi!")
  61. TorielFace.SetAnimation({"spr_face_torielmadblink_0", "spr_face_torielmad_1"}, 1/4)
  62. end
  63. end
  64. end
  65. end
  66. end
  67. if spacePressed == true and Text.lineComplete == true then
  68. DEBUG("It works too!")
  69. TorielFace.StopAnimation()
  70. TorielFace.SetAnimation({"spr_face_torielmadblink_0", "spr_face_torielmad_1"}, 1/4)
  71. end
  72.  
  73. if spacePressed == true and Text.allLinesComplete == true and Input.GetKey("Z") < 0 then
  74. TorielFace.StopAnimation()
  75. if Input.GetKey("Z") > 0 then
  76. spacePressed = false
  77. Text.DestroyText()
  78. DialogueBox.Remove()
  79. Toriel.Remove()
  80. TorielFace.Remove()
  81. BlackLayer.Remove()
  82. Map.Remove()
  83. wavetimer = 0
  84. EndWave()
  85. Player.sprite.scale(1,1)
  86. require "Encounters/encounter"
  87. end
  88. end
  89. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement