Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_followinglight_Step_0

(view raw script w/o annotations or w/e)
1
if (global.interact != 1 || timer <= 0)
2
    timer -= 0.2;
3
if (timer > 30)
4
    timer = 30;
5
if (timer < 0)
6
    timer -= 0.1;
7
if (timer < -10)
8
    timer = -10;
9
radius = 
scr_ease_out
scr_ease_out

function
scr_ease_out(arg0, arg1)
{ if (arg1 < -3 || arg1 > 7) return arg0; switch (arg1) { case -3: return ease_out_bounce(arg0, 0, 1, 1); case -2: return ease_out_elastic(arg0, 0, 1, 1); case -1: return ease_out_back(arg0, 0, 1, 1); case 0: return arg0; case 1: return sin(arg0 * 1.5707963267948966); case 2: return -arg0 * (arg0 - 2); case 6: return -power(2, -10 * arg0) + 1; case 7: arg0--; return sqrt(1 - (arg0 * arg0)); default: arg0--; if (arg1 == 4) { return -1 * (power(arg0, arg1) - 1); break; } return power(arg0, arg1) + 1; } }
(timer / 30, 4) * 160;
10
siner++;
11
smallerLight = max(0, (sin(siner / 30) * 10) + radius);
12
biggerLight = max(0, (sin((siner - 10) / 30) * 10) + radius + 40);
13
image_xscale = (radius + 50) / 210;
14
image_yscale = (radius + 50) / 210;
15
if (radius < -50)
16
    radius = -50;