Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_martlet_g_head_Step_2

related scripts: Create_0Destroy_0Step_0Step_2

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