Advertisement
Guest User

Untitled

a guest
Jan 24th, 2020
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.02 KB | None | 0 0
  1. Compiling "return function(self)
  2.  
  3. checked = false;
  4.  
  5. ---------------------------------------------------------
  6. ---------DOCUMENTATION-----------------------------------
  7. ---------------------------------------------------------
  8.  
  9. --function perframe( beat, endBeat )
  10. --return true if the current beat is between 'beat' and 'endBeat'
  11.  
  12. --function mod_shader(beat,key,which)
  13. --turn on shader key at specified beat (up to 10 keys available, defined by 'which' = 0-9
  14.  
  15. --function mod_insert(beat,len,mod,len_or_end,pn)
  16. --insert mod into beat mods table
  17. --function mod_insert2(time,len,mod,len_or_end,pn)
  18. --insert mod into time mods table
  19. --function mod_ease(beat, len, start_strength, end_strength, mod, len_or_end, ease_type, pn, sustain, opt1, opt2)
  20. --insert mod into ease mods table
  21. --function mod_perframe(start, end, function(beat, deltatime))
  22. --insert function into perframe reader
  23.  
  24. --function mod_message(beat,msg,persistent)
  25. --insert something into the actions table.
  26. --msg can also be a function. If string, a message gets broadcast at that beat
  27. --if 'persistent' is true, message will run even if editor starts at a beat past it
  28.  
  29. --function mod_blacklist(t,n)
  30. --check if number n occurs in table t
  31. --useful for doing 'every beat EXCEPT the contents of t'
  32.  
  33. --function simple_m0d(beat,strength,mult,mod)
  34. --function simple_m0d2(beat,strength,mult,mod,pn)
  35. --function simple_m0d3(beat,strength,duration,bpm,mod,pn)
  36. --activate mods at specific beat but also deactivate them
  37.  
  38. --function mod_wiggle(beat,num,div,amt,speed,mod,pn,first)
  39. --alternates a mod back and forth before resetting to 0
  40.  
  41. --function mod_spring(beat,strength,num,mod,pn)
  42. --like mod_wiggle, but springier
  43.  
  44. --function mod_springt(time,strength,dur,mod,pn)
  45. --time-based per-frame alternating mod that decreases based on how much time is left.
  46. --think doorstopper
  47.  
  48. --function mod_springt2(time,strength,dur,mod,pn)
  49. --time-based per-frame alternating mod
  50.  
  51. --function mod_spring_adjustable(beat,strength,num,period,mod,pn, first)
  52. --it's not very good
  53.  
  54. --function mod_beat(beat,strength,pn)
  55. --turns on beat for the beat specified, at the desired strength
  56.  
  57. --function switcheroo_add(beat,which,speed,len,pn)
  58. --adds a column swap at the desired beat
  59. --[[ switcheroos = {normal = {0,0}, ldur = {0,0}, reset = {0,0},
  60. flip = {100,0}, rudl = {100,0}, invert = {0,100}, dlru = {0,100},
  61. ludr = {25,-75}, rdul = {75,75}, drlu = {25,125}, ulrd = {75,-125}, urld = {100,-100}}
  62. ]]
  63.  
  64. --function mod_sugarkiller(beat,duration,speed,minstealth,maxstealth,pn)
  65. --portable version of the effect from sugarkill X
  66.  
  67. --function mod_bounce(beat,length,start,apex,mod,ease_type,pn)
  68. --function func_bounce(beat,length,start,apex,function,ease_type)
  69. --eases out from start to apex, then eases back in from apex to start
  70. --ease_type should be a string, i.e. 'Quad', 'Cubic', 'Circ'
  71.  
  72.  
  73.  
  74. --function modulo(a, b)
  75. --returns the remainder when a is divided by b, works properly with negatives unlike math.mod
  76.  
  77. --function randomXD(t)
  78. --returns a pseudo-random number between 0 and 1 seeded based on the given argument
  79. --returns 0.5 if t is 0 (useful sometimes!)
  80.  
  81. ---------------------------------------------------------
  82. --------END DOCUMENTATION--------------------------------
  83. ---------------------------------------------------------
  84. local m = mod_insert
  85. local me = mod_ease
  86.  
  87.  
  88.  
  89. local linear, inQuad, outQuad, inOutQuad, outInQuad, inCubic, outCubic, inOutCubic, outInCubic, inQuart, outQuart, inOutQuart, outInQuart, inQuint, outQuint, inOutQuint, outInQuint, inSine, outSine, inOutSine, outInSine, inExpo, outExpo, inOutExpo, outInExpo, inCirc, outCirc, inOutCirc, outInCirc, inElastic, outElastic, inOutElastic, outInElastic, inBack, outBack, inOutBack, outInBack, inBounce, outBounce, inOutBounce, outInBounce = ease.linear, ease.inQuad, ease.outQuad, ease.inOutQuad, ease.outInQuad, ease.inCubic, ease.outCubic, ease.inOutCubic, ease.outInCubic, ease.inQuart, ease.outQuart, ease.inOutQuart, ease.outInQuart, ease.inQuint, ease.outQuint, ease.inOutQuint, ease.outInQuint, ease.inSine, ease.outSine, ease.inOutSine, ease.outInSine, ease.inExpo, ease.outExpo, ease.inOutExpo, ease.outInExpo, ease.inCirc, ease.outCirc, ease.inOutCirc, ease.outInCirc, ease.inElastic, ease.outElastic, ease.inOutElastic, ease.outInElastic, ease.inBack, ease.outBack, ease.inOutBack, ease.outInBack, ease.inBounce, ease.outBounce, ease.inOutBounce, ease.outInBounce
  90.  
  91. init_modsp1 = '';
  92. init_modsp2 = '';
  93.  
  94. mod_plr = {};
  95.  
  96. mod_firstSeenBeat = GAMESTATE:GetSongBeat(); --necessary to prevent long freezes
  97.  
  98. mod_lasttime = 0
  99.  
  100. ---------------------------------------------------------------------------------------
  101. ----------------------Begin tables 'n stuff--------------------------------------------
  102. ---------------------------------------------------------------------------------------
  103.  
  104. --beat based mods
  105. --{beat_start, beat_end, mods, len_or_end, player_number}
  106. mods = {
  107. {0,9999,'*2 2x, *-1 overhead, *-1 approachtype, *-1 dizzyholds, *-1 stealthpastreceptors, *-1 modtimer','end'},
  108. }
  109.  
  110. --beat-based ease mods
  111. --{beat_start, beat_end, mod_start, mod_end, mod/function, len_or_end, ease_type, player_number, sustainbeats, optional_param1, optional_param2}
  112. --valid ease types are:
  113. --linear
  114. --inQuad outQuad inOutQuad outInQuad
  115. --inCubic outCubic inOutCubic outInCubic
  116. --inQuart outQuart inOutQuart outInQuart
  117. --inQuint outQuint inOutQuint outInQuint
  118. --inSine outSine inOutSine outInSine
  119. --inExpo outExpo inOutExpo outInExpo
  120. --inCirc outCirc inOutCirc outInCirc
  121. --inElastic outElastic inOutElastic outInElastic --can take 2 optional parameters - amplitude & period
  122. --inBack outBack inOutBack outInBack --can take 1 optional parameter - spring amount
  123. --inBounce outBounce inOutBounce outInBounce
  124.  
  125. mods_ease = {
  126. -- EXAMPLE TWEEN: from beat 0 to 4, make rotationz go from 360 to 0 with the inOutBack tween
  127. --{0, 4, 360, 0, 'rotationz', 'len', inOutBack},
  128.  
  129. -- EXAMPLE TWEEN: from beat 4 to 8, rotate topscreen from 360 to 0 with the outBack tween
  130. --{4, 4, 360, 0, function(a) SCREENMAN:GetTopScreen():rotationz(a) end, 'len', outBack},
  131. }
  132.  
  133. --time based mods
  134. mod_time = 0;
  135. --{time_start, time_end, mods, len_or_end, player_number}
  136. mods2 = {
  137. }
  138.  
  139. -- you can now write perframe stuff without having to scroll down!
  140. -- {beat_start,beat_end,function(beat,deltatime)}
  141. mod_perframes = {
  142. --{18,24,function(beat,deltatime)
  143. -- do stuff every frame from beat 18-24
  144. -- print(beat,deltatime)
  145. --end},
  146. }
  147.  
  148. --this is both a message broadcaster and a function runner
  149. --if you put {beat,'String'}, then 'String' is broadcast as a message on that beat
  150. --if you put {beat,function() somecode end}, then function() is run at that beat
  151. --see example on beat 0
  152.  
  153. curaction = 1;
  154. --{beat,thing,persists}
  155. mod_actions = {
  156. {0,'GetProxy',true},
  157. {0,function()
  158. for pn=1,2 do
  159. local a = Plr(pn)
  160. if a then
  161. a:GetChild('Judgment'):hidden(1)
  162. a:GetChild('Combo'):hidden(1)
  163. a:SetFarDist(10000)
  164. end
  165. end
  166.  
  167. for pn=1,2 do
  168. local d = 0.25; if pn == 2 then d = 0.75 end
  169. local b = _G['jud'..pn..'p']
  170. if b then
  171. b:hidden(0);
  172. b:basezoomx(0.75);
  173. b:basezoomy(0.75);
  174. b:x(SCREEN_WIDTH*d)
  175. b:y(SCREEN_HEIGHT*0.5)
  176. end
  177. local c = _G['com'..pn..'p']
  178. if c then
  179. c:hidden(0);
  180. c:basezoomx(0.75);
  181. c:basezoomy(0.75);
  182. c:x(SCREEN_WIDTH*d)
  183. c:y(SCREEN_HEIGHT*0.5)
  184. end
  185. end
  186. end,true},
  187. {0,function()
  188. local P1 = SCREENMAN'PlayerP1'
  189. P1:SetXSpline(
  190. 0
  191. -1
  192. -100
  193. .5
  194. -1
  195. )
  196.  
  197.  
  198. }
  199. }
  200.  
  201.  
  202. --for i=0,11,1 do
  203. --me(i,i+0.5,0,100,'reverse'..(i%4),'len',outExpo,nil,3)
  204. --if i==4 or i==8 then
  205. --me(i,i+0.5,0,100,'reverse','end',outExpo)
  206. --end
  207. --end
  208.  
  209. m(0,9999,'*-1 2000 drunkspeed, *-1 100 arrowpath, *-1 100 bumpy', 'end')
  210.  
  211.  
  212. for i=0,15,1 do
  213. m(i,i+1,'*-1 157*(1+i) confusionoffset', 'end')
  214. end
  215.  
  216.  
  217.  
  218. ---------------------------------------------------------------------------------------
  219. ----------------------Sort the actions table-------------------------------------------
  220. ---------------------------------------------------------------------------------------
  221.  
  222. function modtable_compare(a,b)
  223. return a[1] < b[1]
  224. end
  225.  
  226. if table.getn(mod_actions) > 1 then
  227. table.sort(mod_actions, modtable_compare)
  228. end
  229.  
  230. self:queuecommand('Update');
  231.  
  232. end": [string "in"]:193: `)' expected (to close `(' at line 189) near `.5'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement