Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_martlet_head_Step_2

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