Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_sneo_friedpipis_Step_0

(view raw script w/o annotations or w/e)
1
timer++;
2
image_speed = 0;
3
if (timer == 1)
4
    snd_play(snd_spell_cure_slight_smaller);
5
if (timer > 0 && timer < 21)
6
{
7
    image_xscale = lerp(0, 2, timer / 20);
8
    image_yscale = lerp(0, 2, timer / 20);
9
    var easedlerp = 
scr_ease_inout
scr_ease_inout

function
scr_ease_inout(arg0, arg1)
{ if (arg1 < -3 || arg1 > 7) return arg0; if (arg1 == -3) return ease_inout_bounce(arg0, 0, 1, 1); else if (arg1 == -2) return ease_inout_elastic(arg0, 0, 1, 1); else if (arg1 == -1) return ease_inout_back(arg0, 0, 1, 1); else if (arg1 == 1) return -0.5 * cos((pi * arg0) - 1); else if (arg1 == 0) return arg0; arg0 *= 2; if (arg0 < 1) { return 0.5 *
scr_ease_in(arg0, arg1);
} else { arg0--; return 0.5 * (
scr_ease_out(arg0, arg1) + 1);
} }
(timer / 20, 2);
10
    image_angle = lerp(0, 720, easedlerp);
11
}
12
if (timer > 25 && timer < 36)
13
    x = lerp(x, obj_herokris.x + 35, (timer - 25) / 10);
14
if (timer > 35)
15
{
16
    image_xscale += 0.4;
17
    image_yscale += 0.4;
18
    image_alpha -= 0.1;
19
}
20
if (timer == 45)
21
{
22
    star = 0;
23
    
scr_healitemspell
scr_healitemspell

function
scr_healitemspell(arg0)
{
scr_heal(star, arg0);
global.spelldelay = 15; with (global.charinstance[star]) { ha = instance_create(x, y, obj_healanim); ha.target = id; if (global.chapter == 2 && instance_exists(o_boxingcontroller)) ha.target = o_boxingcontroller.id; dmgwr =
scr_dmgwriter_selfchar();
with (dmgwr) { delay = 8; type = 3; damage = arg0; } if (global.hp[global.char[myself]] >= global.maxhp[global.char[myself]]) { with (dmgwr) specialmessage = 3; } tu += 1; return ha; } }
(120);
24
    instance_destroy();
25
}