Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_blue_platform_Draw_0

(view raw script w/o annotations or w/e)
1
image_index = array_get(
scr_platswap_yscale
scr_platswap_yscale

function
scr_platswap_yscale()
{ with (obj_platswap) return __transition_yscale; return [0, 1]; }
(), 0) > 0.5;
2
if (has_active_plat)
3
{
4
    var xx = x;
5
    var yy = y;
6
    var xscale = image_xscale;
7
    var yscale = image_yscale;
8
    y = floor(y + (sin(squishtimer * 1 * pi) * 2));
9
    image_xscale += (sin(squishtimer * 0.5 * pi) * 0.1);
10
    image_yscale -= (sin(squishtimer * 0.5 * pi) * 0.1);
11
    draw_self();
12
    x = xx;
13
    y = yy;
14
    image_xscale = xscale;
15
    image_yscale = yscale;
16
}
17
if (explodetimer > 0)
18
{
19
    var t = (30 - explodetimer) / 30;
20
    var alph = min(t * 2, 1);
21
    var rot = lerp(270, 0, ease_out_quad(alph, 0, 1, 1));
22
    var xs = lerp(0, 2, ease_out_quad(alph, 0, 1, 1));
23
    var ys = xs;
24
    draw_sprite_ext(spr_enemy_yellow_reticle, 0, x, y, xs, ys, rot, c_white, alph);
25
}