Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_dialogue_box_battle_transformation_any_out_Step_0

(view raw script w/o annotations or w/e)
1
if (no_loop_create == false)
2
{
3
    sprite_width_end = sprite_width_destination / sprite_width
4
    sprite_height_end = sprite_height_destination / sprite_height
5
    var sprite_width_multiplier = abs(image_xscale_default - sprite_width_end * image_xscale_default)
6
    var sprite_height_multiplier = abs(image_yscale_default - sprite_height_end * image_yscale_default)
7
    if ((sprite_width_end * image_xscale_default) > image_xscale_default)
8
        width_increase_type = 1
9
    else
10
        width_increase_type = 0
11
    if ((sprite_height_end * image_yscale_default) > image_yscale_default)
12
        height_increase_type = 1
13
    else
14
        height_increase_type = 0
15
    max_frames = 10
16
    sprite_width_increase = sprite_width_multiplier / max_frames
17
    sprite_height_increase = sprite_height_multiplier / max_frames
18
    destination_x = x + disjoint_x
19
    destination_y = y + disjoint_y
20
    if (destination_x > x)
21
        x_increase_type = 1
22
    else
23
        x_increase_type = 0
24
    if (destination_y > y)
25
        y_increase_type = 1
26
    else
27
        y_increase_type = 0
28
    x_increase = disjoint_x / max_frames
29
    y_increase = disjoint_y / max_frames
30
    transform_direction = 0
31
    no_loop_create = true
32
}
33
if (transform_direction == 0 || transform_direction == 2)
34
{
35
    if (width_increase_type == 0)
36
    {
37
        if (image_xscale > (sprite_width_end * image_xscale_default))
38
        {
39
            image_xscale -= sprite_width_increase
40
            if (image_xscale < (sprite_width_end * image_xscale_default))
41
                image_xscale = sprite_width_end * image_xscale_default
42
        }
43
    }
44
    else if (width_increase_type == 1)
45
    {
46
        if (image_xscale < (sprite_width_end * image_xscale_default))
47
        {
48
            image_xscale += sprite_width_increase
49
            if (image_xscale > (sprite_width_end * image_xscale_default))
50
                image_xscale = sprite_width_end * image_xscale_default
51
        }
52
    }
53
    if (x_increase_type == 0)
54
    {
55
        if (x > destination_x)
56
        {
57
            x += x_increase
58
            if (x < destination_x)
59
                x = destination_x
60
        }
61
    }
62
    else if (x_increase_type == 1)
63
    {
64
        if (x < destination_x)
65
        {
66
            x += x_increase
67
            if (x > destination_x)
68
                x = destination_x
69
        }
70
    }
71
    if (((width_increase_type == 0 && image_xscale == (sprite_width_end * image_xscale_default)) || (width_increase_type == 1 && image_xscale == (sprite_width_end * image_xscale_default))) && x == destination_x && transform_direction != 2)
72
        transform_direction = 1
73
}
74
if (transform_direction == 1 || transform_direction == 2)
75
{
76
    if (height_increase_type == 0)
77
    {
78
        if (image_yscale > (sprite_height_end * image_yscale_default))
79
        {
80
            image_yscale -= sprite_height_increase
81
            if (image_yscale < (sprite_height_end * image_yscale_default))
82
                image_yscale = sprite_height_end * image_yscale_default
83
        }
84
    }
85
    else if (height_increase_type == 1)
86
    {
87
        if (image_yscale < (sprite_height_end * image_yscale_default))
88
        {
89
            image_yscale += sprite_height_increase
90
            if (image_yscale > (sprite_height_end * image_yscale_default))
91
                image_yscale = sprite_height_end * image_yscale_default
92
        }
93
    }
94
    if (y_increase_type == 0)
95
    {
96
        if (y > destination_y)
97
        {
98
            y += y_increase
99
            if (y < destination_y)
100
                y = destination_y
101
        }
102
    }
103
    else if (y_increase_type == 1)
104
    {
105
        if (y < destination_y)
106
        {
107
            y += y_increase
108
            if (y > destination_y)
109
                y = destination_y
110
        }
111
    }
112
    if (((height_increase_type == 0 && image_yscale == (sprite_height_end * image_yscale_default)) || (height_increase_type == 1 && image_yscale == (sprite_height_end * image_yscale_default))) && y == destination_y && transform_direction != 2)
113
        transform_direction = 0
114
}
115
if (((width_increase_type == 0 && image_xscale == (sprite_width_end * image_xscale_default)) || (width_increase_type == 1 && image_xscale == (sprite_width_end * image_xscale_default))) && ((height_increase_type == 0 && image_yscale == (sprite_height_end * image_yscale_default)) || (height_increase_type == 1 && image_yscale == (sprite_height_end * image_yscale_default))) && x == destination_x && y == destination_y && no_loop == false)
116
{
117
    alarm[0] = 2
alarm[0]

script_execute(gml_Script_scr_battle_core_directory_enemy_attack_start) instance_destroy()
118
    no_loop = true
119
}