Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_fan_fan_dunes_7_Step_0

(view raw script w/o annotations or w/e)
1
if (global.dunes_flag[2] == 0)
2
{
3
    if (obj_sandstorm_controller.storm_active == true)
4
    {
5
        if (sprite_index != spr_fan_fan_windy)
6
        {
7
            sprite_index = spr_fan_fan_windy;
8
            image_speed = 0.4;
9
            image_index = 0;
10
        }
11
        else if (image_index > 8)
12
        {
13
            image_index = 5;
14
        }
15
    }
16
    else if (sprite_index == spr_fan_fan_windy && on_animation_end())
17
    {
18
        sprite_index = spr_fan_fan;
19
        image_index = 0;
20
        image_speed = 0;
21
    }
22
}
23
else if (sprite_index == spr_fan_fan_windy)
24
{
25
    sprite_index = spr_fan_fan;
26
    image_index = 0;
27
    image_speed = 0;
28
}
29
if (sprite_index != spr_fan_fan)
30
    exit;
31
event_inherited();
32
if (interact)
33
{
34
    scr_text
scr_text

function scr_text() { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue); }
();
35
    is_talking = true;
36
    if (global.dunes_flag[2] == 0)
37
    {
38
        if (obj_sandstorm_controller.storm_active == true)
39
            msg.message[0] = "* Aa-aa-aa-hh-hh-hh!";
40
        else
41
            msg.message[0] = "* So... hot...";
42
    }
43
    else
44
    {
45
        switch (npc_flag)
46
        {
47
            case 0:
48
                with (msg)
49
                {
50
                    portrait = false;
51
                    sndfnt = 99;
52
                    message[0] = "* Bro, what's your damage?";
53
                    message[1] = "* Can't a monster cool off every#  now and then?";
54
                    message[2] = "* You're such a killjoy, bro.";
55
                }
56
                npc_flag = 1;
57
                break;
58
            case 1:
59
                with (msg)
60
                {
61
                    portrait = false;
62
                    sndfnt = 99;
63
                    message[0] = "* Sorry, I guess.";
64
                    message[1] = "* I get cranky when I don't get#  my fan time.";
65
                    message[2] = "* I like, found it here so I#  decided to put it to use.";
66
                }
67
                npc_flag = 2;
68
                break;
69
            case 2:
70
                with (msg)
71
                {
72
                    portrait = false;
73
                    sndfnt = 99;
74
                    message[0] = "* I should move to Waterfall,#  bro.";
75
                    message[1] = "* Much cooler.";
76
                }
77
                break;
78
        }
79
    }
80
}