Deltarune (Chapter 1) script viewer

← back to main script listing

gml_Object_obj_pacifyspell_Step_0

(view raw script w/o annotations or w/e)
1
if (instance_exists(target) == false)
2
{
3
    con = 99;
4
    instance_destroy();
5
}
6
if (con == 1)
7
{
8
    if (fail == 0)
9
    {
10
        siner += 1;
11
        target.image_blend = merge_color(target.image_blend, flashcolor, 0.1);
12
        if ((siner % 2) == 0)
13
        {
14
            ai = instance_create(target.x + random(target.sprite_width), (target.y + target.sprite_height) - 20, obj_afterimage);
15
            ai.gravity = 0.5;
16
            ai.sprite_index = spr_savepoint;
17
            ai.image_speed = 0.2;
18
        }
19
        target.x += (siner / 4) + (sin(siner / 8) * 10);
20
        target.y -= siner / 5;
21
    }
22
    else
23
    {
24
        siner = 0;
25
        con = 5;
26
    }
27
}
28
if (con == 2)
29
{
30
    with (target)
31
        instance_destroy();
32
    instance_destroy();
33
}
34
if (instance_exists(target) == false)
35
{
36
    con = 99;
37
    instance_destroy();
38
}
39
if (con == 5)
40
{
41
    con = 6;
42
    alarm[4] = 8;
43
}
44
if (con == 6)
45
    target.image_blend = merge_color(target.image_blend, flashcolor, 0.12);
46
if (con == 7)
47
{
48
    con = 8;
49
    alarm[4] = 8;
50
}
51
if (con == 8)
52
    target.image_blend = merge_color(target.image_blend, c_white, 0.16);
53
if (con == 9)
54
{
55
    target.image_blend = c_white;
56
    instance_destroy();
57
}