Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_ceroba_body_pacifist_phase_1_Step_0

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
if (death_sprite == true && sprite_index != spr_ceroba_murder_death)
4
{
5
    sprite_index = spr_ceroba_murder_death
6
    image_speed = 0.25
7
    image_index = 0
8
}
9
if (global.enemy_dead == true)
10
{
11
    instance_create((x - 46), (y - 10), obj_ceroba_dead)
12
    instance_destroy()
13
    return;
14
}
15
if (sprite_index == spr_ceroba_phase_switch && image_index >= 17)
16
{
17
    audio_sound_gain(mus_some_point_of_no_return, 1, 0)
18
    audio_sound_pitch(mus_some_point_of_no_return, 1)
19
    audio_play_sound(mus_some_point_of_no_return, 20, true)
20
    obj_heart_battle_menu.image_alpha = 1
21
    instance_create(0, 0, obj_dialogue_battle_move_select_intro)
22
    sprite_index = spr_ceroba_body
23
    obj_ceroba_staff.image_alpha = 1
24
    obj_ceroba_ponytail.image_alpha = 1
25
    obj_ceroba_hand_left.image_alpha = 1
26
    obj_ceroba_hand_right.image_alpha = 1
27
    obj_ceroba_head.image_alpha = 1
28
    image_speed = 0
29
    anim_stretch_current = 1
30
    anim_stage = 1
31
    anim_inc_multiplier = 2
32
    image_yscale = 1
33
}
34
var anim_loop_time_half = anim_loop_time / 2
35
var anim_inc_current = (anim_stretch_max - 1) / anim_loop_time_half * anim_inc_multiplier
36
if (anim_stage == 1)
37
{
38
    anim_stretch_current += anim_inc_current
39
    anim_inc_multiplier -= (anim_inc_multiplier_max / anim_loop_time_half)
40
    if (anim_stretch_current >= anim_stretch_max)
41
    {
42
        anim_stretch_current = anim_stretch_max
43
        anim_stage = 2
44
        anim_inc_multiplier = anim_inc_multiplier_max
45
    }
46
}
47
if (anim_stage == 2)
48
{
49
    anim_stretch_current -= ((anim_stretch_max - 1) / anim_loop_time_half)
50
    anim_inc_multiplier -= (anim_inc_multiplier_max / anim_loop_time_half)
51
    if (anim_stretch_current <= 1)
52
    {
53
        anim_stretch_current = 1
54
        anim_stage = 1
55
        anim_inc_multiplier = anim_inc_multiplier_max
56
    }
57
}
58
if (sprite_index == spr_ceroba_body)
59
    image_yscale = anim_stretch_current
60
else
61
    image_yscale = 1
62
obj_ceroba_head.y = y - anim_head_offset * image_yscale
63
obj_ceroba_hand_right.y = y - anim_hand_right_offset * image_yscale
64
obj_ceroba_hand_left.y = y - anim_hand_left_offset * image_yscale
65
obj_ceroba_staff.y = y - anim_staff_offset * image_yscale
66
obj_ceroba_ponytail.y = obj_ceroba_head.y - anim_ponytail_offset
67
if (damage_disjoint_count > 0)
68
    damage_disjoint_count -= 1
69
if (instance_exists(obj_text_damage_count) && global.fight_number == 1 && no_loop_damage_disjoint_count == false)
70
{
71
    damage_disjoint_count = 12
72
    no_loop_damage_disjoint_count = true
73
}
74
else if (!instance_exists(obj_text_damage_count))
75
    no_loop_damage_disjoint_count = false
76
if (damage_disjoint_count == 12)
77
    damage_disjoint_x = -50
78
else if (damage_disjoint_count == 10)
79
    damage_disjoint_x = 50
80
else if (damage_disjoint_count == 8)
81
    damage_disjoint_x = -20
82
else if (damage_disjoint_count == 6)
83
    damage_disjoint_x = 20
84
else if (damage_disjoint_count == 4)
85
    damage_disjoint_x = -10
86
else if (damage_disjoint_count == 2)
87
    damage_disjoint_x = 10
88
else if (damage_disjoint_count == 0)
89
{
90
    damage_disjoint_x = 0
91
    if (sprite_index == spr_ceroba_hurt)
92
        sprite_index = spr_ceroba_body
93
}
94
if (damage_disjoint_count > 0)
95
{
96
    sprite_index = spr_ceroba_hurt
97
    if (global.battle_phase == 2)
98
        sprite_index = spr_ceroba_hurt_phase_2
99
    image_xscale = 1
100
    image_yscale = 1
101
}
102
x = starting_point_x + damage_disjoint_x