Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_sneo_tiny_ralsei_Step_2

(view raw script w/o annotations or w/e)
1
image_blend = merge_color(c_red, c_white, hp / hpmax);
2
if (hp < 1)
3
{
4
    if (active == 1)
5
        snd_play(snd_dtrans_flip);
6
    active = 0;
7
    image_alpha -= 0.05;
8
    if (image_alpha < 0.01)
9
        instance_destroy();
10
    exit;
11
}
12
if (instance_exists(obj_heart))
13
{
14
    rotator_target = obj_heart;
15
    depth = obj_heart.depth - 1;
16
    if (button2_h() && xhold < 9)
17
        xhold++;
18
    else if (xhold > 0)
19
        xhold--;
20
    var extra_speed = xhold;
21
    if (extra_speed > 8)
22
        extra_speed = 8;
23
    myspeed = 8 - extra_speed;
24
    x = rotator_target.x + 10 + lengthdir_x(length, place);
25
    y = rotator_target.y + 10 + lengthdir_y(length, place);
26
    place += myspeed;
27
}
28
if (!instance_exists(obj_heart))
29
    visible = false;
30
if (instance_exists(obj_heart))
31
{
32
    if (alarm[0] == 9)
33
        visible = false;
34
    else if (alarm[0] == 8)
35
        visible = false;
36
    else if (alarm[0] == 5)
37
        visible = false;
38
    else if (alarm[0] == 4)
39
        visible = false;
40
    else if (alarm[0] == 1)
41
        visible = false;
42
    else if (alarm[0] == 0)
43
        visible = false;
44
    else
45
        visible = true;
46
}