Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_martlet_g_head_Step_2

(view raw script w/o annotations or w/e)
1
if (!instance_exists(obj_martlet_g_body))
2
{
3
    instance_destroy();
4
    exit;
5
}
6
if (obj_martlet_g_body.animating == true)
7
{
8
    if (obj_martlet_g_body.fight_mode == false)
9
        x = obj_martlet_g_body.x;
10
    else
11
        x = obj_martlet_g_body.x - 10;
12
    y = obj_martlet_g_body.head_displacement_y;
13
}
14
else
15
{
16
    x = starting_point_x;
17
    y = starting_point_y;
18
}
19
var text_parent;
20
if (instance_exists(obj_quote_defeat_parent))
21
    text_parent = 2961;
22
else
23
    text_parent = 2622;
24
if (instance_exists(text_parent) && instance_exists(obj_quote_bubble_battle))
25
{
26
    if (sprite_index != text_parent.portrait_head[text_parent.message_current])
27
        sprite_index = text_parent.portrait_head[text_parent.message_current];
28
}
29
else
30
{
31
    sprite_index = head_sprite;
32
}
33
if (instance_exists(text_parent) && instance_exists(obj_quote_bubble_battle))
34
{
35
    if (text_parent.can_talk == true)
36
    {
37
        if (can_talk_no_loop == false)
38
        {
39
            image_index = 1;
40
            can_talk_no_loop = true;
41
        }
42
        image_speed = global.text_speed * global.talk_speed_martlet * text_parent.hold;
43
    }
44
    else
45
    {
46
        can_talk_no_loop = false;
47
        image_speed = 0;
48
        image_index = 0;
49
    }
50
}
51
else
52
{
53
    can_talk_no_loop = false;
54
    image_speed = 0;
55
    image_index = 0;
56
}
57
with (obj_martlet_g_head_shadow)
58
    event_user(0);