Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_axis_hand_Step_0

(view raw script w/o annotations or w/e)
1
var battle_box = obj_dialogue_box_battle_transformation_any
2
switch scene
3
{
4
    case 0:
5
        if (image_alpha < 0.99)
6
            image_alpha = lerp(image_alpha, 1, 0.4)
7
        else
8
            image_alpha = 1
9
        x = obj_heart_battle_fighting_parent.x
10
        y = obj_heart_battle_fighting_parent.y
11
        if (image_xscale > 1.05)
12
            image_xscale = lerp(image_xscale, 1, 0.4)
13
        else
14
        {
15
            image_index = 1
16
            obj_heart_battle_fighting_parent.image_alpha = 0
17
            obj_battle_enemy_attack_axis_shield.image_alpha = 0
18
            audio_play_sound(snd_mart_impact_2, 1, 0)
19
            cutscene_advance()
20
        }
21
        break
22
    case 1:
23
        cutscene_wait(0.25)
24
        break
25
    case 2:
26
        if (image_alpha > 0.1)
27
            image_alpha = lerp(image_alpha, 0, 0.5)
28
        else
29
        {
30
            image_alpha = 0
31
            cutscene_advance()
32
        }
33
        break
34
    case 3:
35
        cutscene_wait(0.25)
36
        break
37
    case 4:
38
        if (obj_heart_battle_fighting_axis.movement_mode == 1)
39
        {
40
            x = battle_box.x
41
            y = battle_box.y - 20
42
        }
43
        else
44
        {
45
            x = battle_box.x
46
            y = battle_box.bbox_bottom - 20
47
        }
48
        image_xscale = 2.5
49
        image_yscale = 2.5
50
        cutscene_advance()
51
        break
52
    case 5:
53
        if (image_alpha < 0.99)
54
            image_alpha = lerp(image_alpha, 1, 0.4)
55
        else
56
            image_alpha = 1
57
        if (image_xscale > 1.01)
58
            image_xscale = lerp(image_xscale, 1, 0.4)
59
        else
60
        {
61
            audio_play_sound(snd_rock_break, 1, 0)
62
            image_index = 0
63
            scr_screenshake_battle
scr_screenshake_battle

function scr_screenshake_battle() //gml_Script_scr_screenshake_battle { instance_destroy(obj_screenshake_battle) var screenshake = instance_create(0, 0, obj_screenshake_battle) battle_screenshake_duration = argument[0] battle_screenshake_intensity = argument[1] battle_screenshake_dec = battle_screenshake_intensity / battle_screenshake_duration }
(1, 2)
64
            if (obj_heart_battle_fighting_axis.movement_mode == 1)
65
                obj_heart_battle_fighting_parent.movement_mode = 2
66
            else
67
                obj_heart_battle_fighting_axis.movement_mode = 1
68
            obj_heart_battle_fighting_parent.image_alpha = 1
69
            obj_battle_enemy_attack_axis_shield.image_alpha = 1
70
            cutscene_advance()
71
        }
72
        break
73
    case 6:
74
        if (image_alpha > 0.01)
75
            image_alpha = lerp(image_alpha, 0, 0.25)
76
        else
77
            instance_destroy()
78
        break
79
}
80
81
image_yscale = image_xscale