Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_flowey_battle_ow_determination_Step_0

(view raw script w/o annotations or w/e)
1
if (live_call())
2
    return global.live_result;
3
if (scr_interact
scr_interact

function scr_interact() { if (distance_to_object(obj_pl) < 20 && obj_pl.state == scr_normal_state) { var pl_dir = obj_pl.direction; var pl_x = 0; var pl_y = 0; var check_distance_x = 0; var check_distance_y = 0; switch (pl_dir) { case 0: pl_x = obj_pl.bbox_right; pl_y = obj_pl.bbox_top + 1; check_distance_x = 20; break; case 180: pl_x = obj_pl.bbox_left; pl_y = obj_pl.bbox_top + 1; check_distance_x = -20; break; case 90: pl_x = obj_pl.x; pl_y = obj_pl.bbox_top; check_distance_y = -20; break; case 270: pl_x = obj_pl.x; pl_y = obj_pl.bbox_bottom; check_distance_y = 20; break; } if (collision_line_first(pl_x, pl_y, pl_x + check_distance_x, pl_y + check_distance_y, id, false, false)) return true; } }
() && keyboard_multicheck_pressed(0))
4
{
5
    fade_out = true;
6
    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; }
();
7
    obj_flowey_battle_ow_controller.spawn_vines = false;
8
    audio_play_sound(snd_heal, 1, 0);
9
    if (global.current_hp_self < global.max_hp_self)
10
        global.current_hp_self = global.max_hp_self;
11
    var cymbal = audio_play_sound(113, 1, 0, 0, 3);
12
    audio_sound_gain(cymbal, 1, 500);
13
}
14
if (fade_out == true)
15
{
16
    if (global.flowey_battle_1_phase > 3)
17
    {
18
        if (draw_alpha < 1)
19
            draw_alpha += 0.04;
20
        else if (!alarm[0])
21
            alarm[0] = 60;
gml_Object_obj_flowey_battle_ow_determination_Alarm_0.gml

if (global.flowey_battle_1_phase < 4) { global.battle_enemy_name = "flowey"; global.battling_boss = true; global.battle_start = true; global.sound_carry_overworld = false; room_goto(rm_battle_flowey Flowey - Phase 1 Battle Room); audio_stop_sound(mus_cymbal); obj_pl.image_alpha = 0; scr_battle_save(); } else { room = rm_battle_flashback_final; obj_pl.x = 20; obj_pl.y = 150; }
22
    }
23
    else if (draw_alpha < 1)
24
    {
25
        draw_alpha += 0.05;
26
    }
27
    else if (!alarm[0])
28
    {
29
        alarm[0] = 30;
gml_Object_obj_flowey_battle_ow_determination_Alarm_0.gml

if (global.flowey_battle_1_phase < 4) { global.battle_enemy_name = "flowey"; global.battling_boss = true; global.battle_start = true; global.sound_carry_overworld = false; room_goto(rm_battle_flowey Flowey - Phase 1 Battle Room); audio_stop_sound(mus_cymbal); obj_pl.image_alpha = 0; scr_battle_save(); } else { room = rm_battle_flashback_final; obj_pl.x = 20; obj_pl.y = 150; }
30
    }
31
    scr_screenshake
scr_screenshake

function scr_screenshake(arg0, arg1) { if (instance_exists(obj_screenshake_player)) exit; with (instance_create(__view_get(e__VW.Object, 0).x, __view_get(e__VW.Object, 0).y, obj_screenshake_player)) { alarm[0]
gml_Object_obj_flowey_battle_ow_determination_Alarm_0.gml

if (global.flowey_battle_1_phase < 4) { global.battle_enemy_name = "flowey"; global.battling_boss = true; global.battle_start = true; global.sound_carry_overworld = false; room_goto(rm_battle_flowey Flowey - Phase 1 Battle Room); audio_stop_sound(mus_cymbal); obj_pl.image_alpha = 0; scr_battle_save(); } else { room = rm_battle_flashback_final; obj_pl.x = 20; obj_pl.y = 150; }
intensity = arg1; } } enum e__VW { XView, YView, WView, HView, Angle, HBorder, VBorder, HSpeed, VSpeed, Object, Visible, XPort, YPort, WPort, HPort, Camera, SurfaceID }
(999, 4 * draw_alpha);
32
}