Undertale script viewer

← back to main script listing

gml_Object_obj_torieltrigger2_Step_0

(view raw script w/o annotations or w/e)
1
if (conversation == 0 && (obj_mainchara.x > 140 || obj_mainchara.y < 170))
2
{
3
    global.msc = 204;
4
    global.typer = 4;
5
    global.interact = 1;
6
    global.facechoice = 1;
7
    instance_create(0, 0, obj_dialoguer);
8
    conversation = 1;
9
}
10
if (conversation == 1 && instance_exists(obj_dialoguer) == 0)
11
{
12
    global.interact = 0;
13
    conversation = 2;
14
    with (obj_toroverworld4)
15
        path_start(path_torielwalk3, 3.25, path_action_stop, 1);
16
}
17
if (instance_exists(obj_toroverworld4))
18
{
19
    if (conversation == 2 && obj_toroverworld4.path_position == 1)
20
    {
21
        conversation = 2.5;
22
        with (obj_toroverworld4)
23
            path_end();
24
        if (global.plot < 4)
25
        {
26
            global.plot = 4;
27
            instance_create(obj_toroverworld4.x, obj_toroverworld4.y, obj_torinteractable1);
28
            with (obj_toroverworld4)
29
                instance_destroy();
30
        }
31
    }
32
}
33
if (conversation == 2.5 && global.plot == 4.5)
34
{
35
    conversation = 3;
36
    if (instance_exists(obj_torinteractable1))
37
    {
38
        instance_create(obj_torinteractable1.x, obj_torinteractable1.y, obj_toroverworld4);
39
        with (obj_torinteractable1)
40
            instance_destroy();
41
    }
42
    with (obj_toroverworld4)
43
        path_start(path_torielwalk3_2, 3, path_action_stop, 1);
44
}
45
if (instance_exists(obj_toroverworld4))
46
{
47
    if (conversation == 3 && obj_toroverworld4.path_position == 1)
48
    {
49
        conversation = 4;
50
        with (obj_toroverworld4)
51
            path_end();
52
        instance_create(obj_toroverworld4.x, obj_toroverworld4.y, obj_torinteractable2);
53
        with (obj_toroverworld4)
54
            instance_destroy();
55
    }
56
}
57
if (conversation == 4 && global.plot == 5 && instance_exists(obj_shaker) == 0)
58
{
59
    if (instance_exists(obj_torinteractable2))
60
    {
61
        instance_create(obj_torinteractable2.x, obj_torinteractable2.y, obj_toroverworld4);
62
        with (obj_torinteractable2)
63
            instance_destroy();
64
        with (obj_toroverworld4)
65
            facing = 3;
66
        with (obj_toroverworld4)
67
            sprite_index = lsprite;
68
    }
69
    global.msc = 210;
70
    global.typer = 4;
71
    global.interact = 1;
72
    global.facechoice = 1;
73
    instance_create(0, 0, obj_dialoguer);
74
    conversation = 5;
75
}
76
if (conversation == 5 && instance_exists(obj_dialoguer) == 0)
77
{
78
    conversation = 6;
79
    global.interact = 0;
80
    with (obj_toroverworld4)
81
        path_start(path_walkright, 3, path_action_stop, 0);
82
    instance_destroy();
83
}