Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_goosic_body_a_Step_0

(view raw script w/o annotations or w/e)
1
var enemy_dead = global.enemy_dead
2
var enemy_spared = global.enemy_spared
3
var enemy_sparing = global.enemy_sparing
4
if (enemy_dead == false && enemy_spared == false)
5
    image_alpha = global.image_alpha_enemy_attacking
6
if (enemy_dead == true)
7
{
8
    x = xstart
9
    y = ystart
10
    instance_create(starting_point_x, starting_point_y, obj_goosic_dead)
11
    layer_sequence_destroy(24)
12
    instance_destroy()
13
    return;
14
}
15
else if (enemy_spared == true)
16
{
17
    sprite_index = spr_goosic_spared
18
    x = xstart
19
    y = ystart
20
    image_speed = 0
21
    image_index = 0
22
    image_alpha = 0.5
23
    if (no_loop_create_clouds == false)
24
    {
25
        for (i = 0; i <= 11; i += 1)
26
            instance_create(x, (y - 22), obj_spare_cloud)
27
    }
28
    no_loop_create_clouds = true
29
}
30
if (damage_disjoint_count > 0)
31
    damage_disjoint_count -= 1
32
else if (enemy_dead == false && enemy_spared == false && damage_disjoint_count <= 0)
33
{
34
    if (global.enemy_low_hp == true && global.current_hp_enemy < global.max_hp_enemy)
35
    {
36
        if (!low_hp_noloop)
37
        {
38
            layer_sequence_destroy(idle_seq)
39
            layer_sequence_create("sequence_layer", x, y, 17)
40
            low_hp_noloop = true
41
        }
42
        sprite_index = -4
43
    }
44
    else
45
        sprite_index = -4
46
}
47
else if (enemy_spared == true)
48
    sprite_index = spr_goosic_spared
49
if (instance_exists(obj_text_damage_count) && global.fight_number == 1 && no_loop_damage_disjoint_count == false)
50
{
51
    sprite_index = spr_goosic_hurt
52
    time_elapsed = 0
53
    sign_modifier = 1
54
    damage_disjoint_count = 12
55
    no_loop_damage_disjoint_count = true
56
    audio_play_sound(enemy_hurt_noise, 1, 0, 1, 0, enemy_hurt_pitch)
57
}
58
else if (!instance_exists(obj_text_damage_count))
59
    no_loop_damage_disjoint_count = false
60
if (damage_disjoint_count == 12)
61
    damage_disjoint_x = -50
62
else if (damage_disjoint_count == 10)
63
    damage_disjoint_x = 50
64
else if (damage_disjoint_count == 8)
65
    damage_disjoint_x = -20
66
else if (damage_disjoint_count == 6)
67
    damage_disjoint_x = 20
68
else if (damage_disjoint_count == 4)
69
    damage_disjoint_x = -10
70
else if (damage_disjoint_count == 2)
71
    damage_disjoint_x = 10
72
else if (damage_disjoint_count == 0)
73
    damage_disjoint_x = 0
74
x = xstart + damage_disjoint_x
75
if (global.current_hp_enemy <= 0)
76
    sprite_index = spr_goosic_spared