Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_steamworks_29_in_battle_cutscene_2_Step_0

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
switch scene
4
{
5
    case 0:
6
        if (obj_heart_battle_fighting_parent.image_alpha > 0)
7
            obj_heart_battle_fighting_parent.image_alpha -= 0.2
8
        else
9
            obj_heart_battle_fighting_parent.image_alpha = 0
10
        cutscene_wait(1)
11
        break
12
    case 1:
13
        obj_dialogue_box_battle_transformation_any.battle_box_resize_midfight = true
14
        scene++
15
        break
16
    case 2:
17
        if (obj_dialogue_box_battle_transformation_any.battle_box_resize_midfight == false)
18
            cutscene_advance()
19
        break
20
    case 3:
21
        scr_text_battle
scr_text_battle

function scr_text_battle() //gml_Script_scr_text_battle { if (!instance_exists(obj_dialogue_battle)) msg = instance_create(x, y, obj_dialogue_battle) }
()
22
        with (msg)
23
        {
24
            sndfnt = 108
25
            message[0] = "* This is only getting#  worse!"
26
            message[1] = "* Don't stop your efforts#  to free us!"
27
            prt[0] = 381
28
            prt[1] = 370
29
        }
30
        if (!global.dialogue_open)
31
            cutscene_advance()
32
        break
33
    case 4:
34
        if scr_battle_box_resize_midfight
scr_battle_box_resize_midfight

function scr_battle_box_resize_midfight() //gml_Script_scr_battle_box_resize_midfight { if instance_exists(obj_dialogue_box_battle_transformation_any) { with (obj_dialogue_box_battle_transformation_any) { battle_box_resize_midfight = true battle_box_target_xscale = argument[0] / sprite_get_width(sprite_index) battle_box_target_yscale = argument[1] / sprite_get_height(sprite_index) if (argument_count > 2) { battle_box_target_x = argument[2] battle_box_target_y = argument[3] } if (abs(image_xscale - battle_box_target_xscale) < 0.01 && abs(image_yscale - battle_box_target_yscale) < 0.01 && abs(x - battle_box_target_x) < 0.1 && abs(y - battle_box_target_y) < 0.1) { var box = obj_dialogue_box_battle_transformation_any global.attack_surface_width = box.sprite_width - 8 global.attack_surface_height = box.sprite_height - 8 global.attack_surface_x = box.x - global.attack_surface_width * 0.5 global.attack_surface_y = box.y - global.attack_surface_height * 0.5 if surface_exists(global.attack_surface) global.attack_surface = surface_create(global.attack_surface_width, global.attack_surface_height) return true; } } } else return false; }
(140, 140)
35
            scene++
36
        break
37
    case 5:
38
        instance_destroy()
39
        obj_heart_battle_fighting_parent.image_alpha = 1
40
        with (obj_heart_battle_fighting_parent)
41
            moveable = true
42
        break
43
}