Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Compiling "return function(self)
- checked = false;
- ---------------------------------------------------------
- ---------DOCUMENTATION-----------------------------------
- ---------------------------------------------------------
- --function perframe( beat, endBeat )
- --return true if the current beat is between 'beat' and 'endBeat'
- --function mod_shader(beat,key,which)
- --turn on shader key at specified beat (up to 10 keys available, defined by 'which' = 0-9
- --function mod_insert(beat,len,mod,len_or_end,pn)
- --insert mod into beat mods table
- --function mod_insert2(time,len,mod,len_or_end,pn)
- --insert mod into time mods table
- --function mod_ease(beat, len, start_strength, end_strength, mod, len_or_end, ease_type, pn, sustain, opt1, opt2)
- --insert mod into ease mods table
- --function mod_perframe(start, end, function(beat, deltatime))
- --insert function into perframe reader
- --function mod_message(beat,msg,persistent)
- --insert something into the actions table.
- --msg can also be a function. If string, a message gets broadcast at that beat
- --if 'persistent' is true, message will run even if editor starts at a beat past it
- --function mod_blacklist(t,n)
- --check if number n occurs in table t
- --useful for doing 'every beat EXCEPT the contents of t'
- --function simple_m0d(beat,strength,mult,mod)
- --function simple_m0d2(beat,strength,mult,mod,pn)
- --function simple_m0d3(beat,strength,duration,bpm,mod,pn)
- --activate mods at specific beat but also deactivate them
- --function mod_wiggle(beat,num,div,amt,speed,mod,pn,first)
- --alternates a mod back and forth before resetting to 0
- --function mod_spring(beat,strength,num,mod,pn)
- --like mod_wiggle, but springier
- --function mod_springt(time,strength,dur,mod,pn)
- --time-based per-frame alternating mod that decreases based on how much time is left.
- --think doorstopper
- --function mod_springt2(time,strength,dur,mod,pn)
- --time-based per-frame alternating mod
- --function mod_spring_adjustable(beat,strength,num,period,mod,pn, first)
- --it's not very good
- --function mod_beat(beat,strength,pn)
- --turns on beat for the beat specified, at the desired strength
- --function switcheroo_add(beat,which,speed,len,pn)
- --adds a column swap at the desired beat
- --[[ switcheroos = {normal = {0,0}, ldur = {0,0}, reset = {0,0},
- flip = {100,0}, rudl = {100,0}, invert = {0,100}, dlru = {0,100},
- ludr = {25,-75}, rdul = {75,75}, drlu = {25,125}, ulrd = {75,-125}, urld = {100,-100}}
- ]]
- --function mod_sugarkiller(beat,duration,speed,minstealth,maxstealth,pn)
- --portable version of the effect from sugarkill X
- --function mod_bounce(beat,length,start,apex,mod,ease_type,pn)
- --function func_bounce(beat,length,start,apex,function,ease_type)
- --eases out from start to apex, then eases back in from apex to start
- --ease_type should be a string, i.e. 'Quad', 'Cubic', 'Circ'
- --function modulo(a, b)
- --returns the remainder when a is divided by b, works properly with negatives unlike math.mod
- --function randomXD(t)
- --returns a pseudo-random number between 0 and 1 seeded based on the given argument
- --returns 0.5 if t is 0 (useful sometimes!)
- ---------------------------------------------------------
- --------END DOCUMENTATION--------------------------------
- ---------------------------------------------------------
- local m = mod_insert
- local me = mod_ease
- 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
- init_modsp1 = '';
- init_modsp2 = '';
- mod_plr = {};
- mod_firstSeenBeat = GAMESTATE:GetSongBeat(); --necessary to prevent long freezes
- mod_lasttime = 0
- ---------------------------------------------------------------------------------------
- ----------------------Begin tables 'n stuff--------------------------------------------
- ---------------------------------------------------------------------------------------
- --beat based mods
- --{beat_start, beat_end, mods, len_or_end, player_number}
- mods = {
- {0,9999,'*2 2x, *-1 overhead, *-1 approachtype, *-1 dizzyholds, *-1 stealthpastreceptors, *-1 modtimer','end'},
- }
- --beat-based ease mods
- --{beat_start, beat_end, mod_start, mod_end, mod/function, len_or_end, ease_type, player_number, sustainbeats, optional_param1, optional_param2}
- --valid ease types are:
- --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 --can take 2 optional parameters - amplitude & period
- --inBack outBack inOutBack outInBack --can take 1 optional parameter - spring amount
- --inBounce outBounce inOutBounce outInBounce
- mods_ease = {
- -- EXAMPLE TWEEN: from beat 0 to 4, make rotationz go from 360 to 0 with the inOutBack tween
- --{0, 4, 360, 0, 'rotationz', 'len', inOutBack},
- -- EXAMPLE TWEEN: from beat 4 to 8, rotate topscreen from 360 to 0 with the outBack tween
- --{4, 4, 360, 0, function(a) SCREENMAN:GetTopScreen():rotationz(a) end, 'len', outBack},
- }
- --time based mods
- mod_time = 0;
- --{time_start, time_end, mods, len_or_end, player_number}
- mods2 = {
- }
- -- you can now write perframe stuff without having to scroll down!
- -- {beat_start,beat_end,function(beat,deltatime)}
- mod_perframes = {
- --{18,24,function(beat,deltatime)
- -- do stuff every frame from beat 18-24
- -- print(beat,deltatime)
- --end},
- }
- --this is both a message broadcaster and a function runner
- --if you put {beat,'String'}, then 'String' is broadcast as a message on that beat
- --if you put {beat,function() somecode end}, then function() is run at that beat
- --see example on beat 0
- curaction = 1;
- --{beat,thing,persists}
- mod_actions = {
- {0,'GetProxy',true},
- {0,function()
- for pn=1,2 do
- local a = Plr(pn)
- if a then
- a:GetChild('Judgment'):hidden(1)
- a:GetChild('Combo'):hidden(1)
- a:SetFarDist(10000)
- end
- end
- for pn=1,2 do
- local d = 0.25; if pn == 2 then d = 0.75 end
- local b = _G['jud'..pn..'p']
- if b then
- b:hidden(0);
- b:basezoomx(0.75);
- b:basezoomy(0.75);
- b:x(SCREEN_WIDTH*d)
- b:y(SCREEN_HEIGHT*0.5)
- end
- local c = _G['com'..pn..'p']
- if c then
- c:hidden(0);
- c:basezoomx(0.75);
- c:basezoomy(0.75);
- c:x(SCREEN_WIDTH*d)
- c:y(SCREEN_HEIGHT*0.5)
- end
- end
- end,true},
- {0,function()
- local P1 = SCREENMAN'PlayerP1'
- P1:SetXSpline(
- 0
- -1
- -100
- .5
- -1
- )
- }
- }
- --for i=0,11,1 do
- --me(i,i+0.5,0,100,'reverse'..(i%4),'len',outExpo,nil,3)
- --if i==4 or i==8 then
- --me(i,i+0.5,0,100,'reverse','end',outExpo)
- --end
- --end
- m(0,9999,'*-1 2000 drunkspeed, *-1 100 arrowpath, *-1 100 bumpy', 'end')
- for i=0,15,1 do
- m(i,i+1,'*-1 157*(1+i) confusionoffset', 'end')
- end
- ---------------------------------------------------------------------------------------
- ----------------------Sort the actions table-------------------------------------------
- ---------------------------------------------------------------------------------------
- function modtable_compare(a,b)
- return a[1] < b[1]
- end
- if table.getn(mod_actions) > 1 then
- table.sort(mod_actions, modtable_compare)
- end
- self:queuecommand('Update');
- end": [string "in"]:193: `)' expected (to close `(' at line 189) near `.5'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement