Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_steamworks_21_controller_geno_Step_0

(view raw script w/o annotations or w/e)
1
if (live_call())
2
    return global.live_result;
3
var axis_run_speed = npc_axis_run_speed;
4
switch (scene)
5
{
6
    case 0:
7
        if (obj_pl.x < 1990)
8
        {
9
            scr_cutscene_start
scr_cutscene_start

function scr_cutscene_start() { global.cutscene = true; obj_pl.state = scr_frozen_state; obj_pl.image_index = 0; obj_pl.image_speed = 0; }
();
10
            scr_radio_fade
scr_radio_fade

function scr_radio_fade(arg0, arg1) { var fade_vol = arg0; var fade_len = arg1; with (obj_radio) audio_sound_gain(current_song, fade_vol, fade_len); }
(0, 300);
11
            obj_pl.direction = 180;
12
            cutscene_advance();
13
        }
14
        break;
15
    case 1:
16
        cutscene_camera_move(1840, obj_pl.y, 3);
17
        break;
18
    case 2:
19
        obj_axis_npc.npc_direction = "right";
20
        cutscene_advance();
21
        break;
22
    case 3:
23
        cutscene_wait(1);
24
        break;
25
    case 4:
26
        cutscene_dialogue();
27
        with (msg)
28
        {
29
            talker[0] = 1166;
30
            message[0] = "* N0.. .";
31
            message[1] = "* R- R3TREATING!";
32
            prt[0] = 3282;
33
            prt[1] = 3282;
34
        }
35
        break;
36
    case 5:
37
        cutscene_camera_move(obj_pl.x, obj_pl.y, 6);
38
        break;
39
    case 6:
40
        event_music = audio_play_sound(mus_axis_chase, 1, 1);
41
        cutscene_camera_reset();
42
        scr_cutscene_end
scr_cutscene_end

function scr_cutscene_end() { global.cutscene = false; obj_pl.alarm[0] = 1; }
();
43
        break;
44
    case 7:
45
        with (obj_axis_npc)
46
        {
47
            can_walk = false;
48
            action_sprite = true;
49
            path_start(pt_steamworks_21_axis_chase_geno, axis_run_speed, path_action_stop, false);
50
        }
51
        axis_is_running = true;
52
        cutscene_advance();
53
        break;
54
    case 8:
55
        if (obj_axis_npc.path_position >= 1)
56
            cutscene_advance();
57
        break;
58
    case 9:
59
        scr_audio_fade_out
scr_audio_fade_out

function scr_audio_fade_out(arg0, arg1) { var snd = arg0; var fade_len = arg1; if (!audio_is_playing(snd)) return false; audio_sound_gain(snd, 0, fade_len); if (instance_exists(obj_audio_fade_helper)) { with (obj_audio_fade_helper) { if (audio_to_fade == snd) return false; } } with (instance_create(0, 0, obj_audio_fade_helper)) audio_to_fade = snd; }
(event_music, 750);
60
        instance_destroy(obj_axis_npc);
61
        cutscene_advance();
62
        break;
63
    case 10:
64
        global.sworks_flag[12] = 1;
65
        instance_destroy();
66
        break;
67
}
68
if (axis_is_running == true && instance_exists(obj_axis_npc))
69
{
70
    with (obj_axis_npc)
71
    {
72
        depth = -y;
73
        if (path_position < 1)
74
        {
75
            image_speed = 1/3;
76
            if (direction == 0)
77
                sprite_index = spr_axis_right;
78
            else if (direction == 90)
79
                sprite_index = spr_axis_up;
80
            else if (direction == 180)
81
                sprite_index = spr_axis_left;
82
            else if (direction == 270)
83
                sprite_index = spr_axis_down;
84
        }
85
    }
86
    if (point_distance(obj_pl.x, obj_pl.y, obj_axis_npc.x, obj_axis_npc.y) < 30)
87
        obj_axis_npc.path_speed += 0.15;
88
}