Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_dogtable_idle_Step_0

(view raw script w/o annotations or w/e)
1
if (con == 1 && !d_ex())
2
{
3
    if (instance_exists(obj_controller_dining3))
4
        obj_controller_dining3.dogcon = 1;
5
    global.interact = 0;
6
    con++;
7
}
8
if (icon == 0 && x > (camerax() - 100) && x < (camerax() + 640) && y > (cameray() - 94) && y < (cameray() + 480))
9
{
10
    timer = 0;
11
    icon = 1;
12
}
13
if (icon == 1)
14
{
15
    timer++;
16
    hspeed = 2;
17
    if (timer == 12)
18
    {
19
        hspeed = 0;
20
        icon++;
21
    }
22
}
23
if (icon == 2)
24
{
25
    dogIndex = 0;
26
    raise -= 2;
27
    raise = clamp(raise, 0, 18);
28
    if (raise == 0)
29
        icon++;
30
}
31
if (toss == 1)
32
{
33
    lid = instance_create(x + 24, y + 18, obj_marker);
34
    lid.sprite_index = spr_saucerlid;
35
    lid.image_xscale = 2;
36
    lid.image_yscale = 2;
37
    if (tossdir == "left")
38
        lid.direction = 120;
39
    else
40
        lid.direction = 60;
41
    lid.speed = 16;
42
    toss = 2;
43
    lidtimer = 0;
44
}
45
if (toss == 2)
46
{
47
    lidtimer++;
48
    if (tossdir == "left")
49
        lid.image_angle += 16;
50
    else
51
        lid.image_angle -= 16;
52
    lid.image_alpha *= 0.9;
53
    if (lidtimer == 60)
54
    {
55
        with (lid)
56
            instance_destroy();
57
        toss = 3;
58
    }
59
}