Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_sneo_phonecall_Draw_0

(view raw script w/o annotations or w/e)
1
draw_set_alpha(fadealpha);
2
draw_set_color(c_white);
3
if (state == 0 || (state == 1 && sneo.partframe[1] == 0))
4
{
5
    siner++;
6
    draw_self();
7
    draw_line_width(x, y, obj_spamton_neo_enemy.x + obj_spamton_neo_enemy.partx[5], -20, 2);
8
    image_angle = sin(siner / 20) * 10;
9
    if (ringtimer > 0)
10
    {
11
        image_angle += (((ringtimer % 2) == 0) ? 1 : -1);
12
        ringtimer--;
13
        if (ringtimer <= 6)
14
            sneo.partmode = 5;
15
    }
16
    x = xstart + (sin((siner + 0) / 20) * 10);
17
    if (ydrop < 1)
18
        ydrop += 0.02;
19
    y = lerp(-30, ystart, 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; } }
(ydrop, -2));
20
}
21
else
22
{
23
    xx = scr_orbitx
scr_orbitx

function scr_orbitx(arg0, arg1, arg2, arg3, arg4) { if (arg4 == 0) return arg2; var __theta = point_direction(arg0, arg1, arg2, arg3); var __radius = point_distance(arg0, arg1, arg2, arg3); __theta += arg4; return arg0 + lengthdir_x(__radius, __theta); }
(0, 0, 20, 50, sneo.partrot[1]) + sneo.x + sneo.partx[1] + sneo.partxoff[1];
24
    yy = scr_orbity
scr_orbity

function scr_orbity(arg0, arg1, arg2, arg3, arg4) { if (arg4 == 0) return arg3; var __theta = point_direction(arg0, arg1, arg2, arg3); var __radius = point_distance(arg0, arg1, arg2, arg3); __theta += arg4; return arg1 + lengthdir_y(__radius, __theta); }
(0, 0, 20, 50, sneo.partrot[1]) + sneo.y + sneo.party[1] + sneo.partyoff[1];
25
    draw_line_width(xx, yy, obj_spamton_neo_enemy.x + obj_spamton_neo_enemy.partx[5], -20, 2);
26
}
27
draw_set_alpha(1);