Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_lightsource_heartlight_Step_0

(view raw script w/o annotations or w/e)
1
if (global.inv > 15)
2
    siner += clamp(global.inv - 15, 1, 30);
3
else
4
    siner++;
5
smallerLight = max(0, (sin(siner / 30) * 10) + current_radius);
6
biggerLight = max(0, (sin((siner - 10) / 30) * 10) + current_radius + (biggerrad * (current_radius / radius)));
7
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
();
8
if (supercharged)
9
{
10
    super_timer++;
11
    depth = obj_heart.depth + 1;
12
    if (super_timer > (12 + random(5)))
13
    {
14
        super_timer = 0;
15
        instance_create(x, y, obj_heartlight_beam);
16
    }
17
}
18
var succ = 0.35;
19
if (instance_exists(obj_jackenstein_enemy))
20
{
21
    if (obj_jackenstein_enemy.sact)
22
        succ += 0.3;
23
}
24
if (i_ex(obj_lightsource_firebar))
25
    succ += 0.1;
26
with (obj_ghosthouse_dot)
27
{
28
    if (point_distance(x, y, obj_heart.x + 5, obj_heart.y + 5) < (48 * succ) && !suck)
29
    {
30
        suck = true;
31
        friction = 0.5;
32
    }
33
}