Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_martlet_g_head_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_mode = global.enemy_mode;
4
if (enemy_dead == true)
5
{
6
    instance_destroy();
7
    exit;
8
    image_alpha = 0.5;
9
}
10
else if (enemy_spared == true)
11
{
12
    instance_destroy();
13
    exit;
14
}
15
if (damage_disjoint_count > 0)
16
{
17
    damage_disjoint_count -= 1;
18
}
19
else if (enemy_dead == false && enemy_spared == false)
20
{
21
    if (obj_martlet_g_body.fight_mode == true)
22
        head_sprite = 3526;
23
    else
24
        head_sprite = 29;
25
}
26
if (instance_exists(obj_text_damage_count) && global.fight_number == 1 && no_loop_damage_disjoint_count == false)
27
{
28
    damage_disjoint_count = 12;
29
    no_loop_damage_disjoint_count = true;
30
}
31
else if (!instance_exists(obj_text_damage_count))
32
{
33
    no_loop_damage_disjoint_count = false;
34
}
35
if (damage_disjoint_count == 12)
36
    damage_disjoint_x = -50;
37
else if (damage_disjoint_count == 10)
38
    damage_disjoint_x = 50;
39
else if (damage_disjoint_count == 8)
40
    damage_disjoint_x = -20;
41
else if (damage_disjoint_count == 6)
42
    damage_disjoint_x = 20;
43
else if (damage_disjoint_count == 4)
44
    damage_disjoint_x = -10;
45
else if (damage_disjoint_count == 2)
46
    damage_disjoint_x = 10;
47
else if (damage_disjoint_count == 0)
48
    damage_disjoint_x = 0;
49
if (damage_disjoint_count > 0)
50
    image_alpha = 0;