Advertisement
Guest User

Untitled

a guest
Oct 16th, 2017
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.64 KB | None | 0 0
  1. startcounting = 0
  2. require "animation"
  3.  
  4. if GetGlobal("DebugSwitcher") == 0 then
  5. makewalls = require "wallmaker"
  6. elseif GetGlobal("DebugSwitcher") == 1 then
  7. makewalls = require "wallmakerdebug"
  8. end
  9.  
  10. local ink = CreateProjectile('Ink/1', 1450, 80)
  11. ink.sprite.SetAnimation({"Ink/2", "Ink/3", "Ink/3", "Ink/4", "Ink/3", "Ink/2", "Ink/1"}, 0.1)
  12.  
  13. inks = {}
  14. bgs = {}
  15.  
  16. movethings = require "movemaker"
  17. gonnadebug = require "debugstuff"
  18. roomthings = require "roomstuff"
  19. npcthings = require "npcmaker"
  20.  
  21. Audio.LoadFile("void")
  22.  
  23. room_size_x = 2330 -- Width of room image.
  24. room_size_y = 960 -- Height of room image.
  25.  
  26. playeroffsetx = -159 -- Changes player's starting position.
  27. playeroffsety = -215
  28.  
  29. roomthings.MakeARoom('Void', room_size_x, room_size_y, playeroffsetx, playeroffsety)
  30.  
  31. gonnadebug.MakeAGrid()
  32.  
  33. -------------------------------
  34. -----Making All The Walls!-----
  35. -------------------------------
  36. makewalls.PlaceLeftWall(345, 238, 4)
  37. makewalls.PlaceRightWall(1985, 238, 4)
  38. makewalls.PlaceTopWall(341, 558, 52)
  39. makewalls.PlaceBottomWall(343, 323, 52)
  40.  
  41. makewalls.PlaceTLCWall(341, 478, 2)
  42. makewalls.PlaceBLCWall(341, 408, 2)
  43. -------------------------------
  44. ---------End Of Walls!---------
  45. -------------------------------
  46.  
  47. function Update()
  48. CheckStuff()
  49. ink.sprite.SendToTop()
  50. ------------------------
  51. -------Your Stuff-------
  52. ------------------------
  53. table.insert(inks, ink)
  54. table.insert(bgs, bg)
  55. if movethings.PlayerIsAt(1650, 2000, -1000, 1000) == true then -- (lower x, upper x, lower y, upper y)
  56. movex_left = 0
  57. movex_right = 0
  58. movey_up = 0
  59. movey_down = 0
  60. SetGlobal("Endtro", 1)
  61. startcounting = startcounting + 1
  62. end
  63. if pressing_up > 0 and pressing_left > 0 then
  64. ink.Move(movex_left, movey_up)
  65. elseif pressing_up > 0 and pressing_right > 0 then
  66. ink.Move(movex_right, movey_up)
  67. elseif pressing_down > 0 and pressing_left > 0 then
  68. ink.Move(movex_left, movey_down)
  69. elseif pressing_down > 0 and pressing_right > 0 then
  70. ink.Move(movex_right, movey_down)
  71. elseif pressing_down > 0 then
  72. ink.Move(0, movey_down)
  73. elseif pressing_up > 0 then
  74. ink.Move(0, movey_up)
  75. elseif pressing_left > 0 then
  76. ink.Move(movex_left, 0)
  77. elseif pressing_right > 0 then
  78. ink.Move(movex_right, 0)
  79. end
  80. if startcounting == 30 then
  81. Audio.Volume(0.65)
  82. elseif startcounting == 45 then
  83. Audio.Volume(0.60)
  84. elseif startcounting == 60 then
  85. Audio.Volume(0.55)
  86. elseif startcounting == 75 then
  87. Audio.Volume(0.50)
  88. elseif startcounting == 90 then
  89. Audio.Volume(0.45)
  90. elseif startcounting == 105 then
  91. Audio.Volume(0.40)
  92. elseif startcounting == 120 then
  93. Audio.Volume(0.35)
  94. elseif startcounting == 135 then
  95. Audio.Volume(0.30)
  96. elseif startcounting == 150 then
  97. Audio.Volume(0.25)
  98. elseif startcounting == 165 then
  99. Audio.Volume(0.20)
  100. elseif startcounting == 180 then
  101. Audio.Volume(0.15)
  102. elseif startcounting == 195 then
  103. Audio.Volume(0.10)
  104. elseif startcounting == 210 then
  105. Audio.Volume(0.05)
  106. elseif startcounting == 225 then
  107. Audio.Volume(0)
  108. elseif startcounting == 300 then
  109. local bg = CreateProjectile('transition', Player.x, Player.y)
  110. elseif startcounting == 330 then
  111. bg.sprite.set('bg')
  112. elseif startcounting == 360 then
  113. bg.sprite.set('transition')
  114. end
  115. ------------------------
  116. ----End Of Your Stuff---
  117. ------------------------
  118. MoveStuff()
  119. end
  120.  
  121. function OnHit()
  122.  
  123. end
  124.  
  125. function CheckStuff()
  126. gonnadebug.DoTheDebug()
  127. movethings.SetMovements()
  128. makewalls.CheckWall()
  129. end
  130.  
  131. function MoveStuff()
  132. makewalls.MoveWall()
  133. movethings.MoveAllTheThings(room)
  134. gonnadebug.MoveTheGrid()
  135. gonnadebug.SwitchDebugMode()
  136. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement