Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_dalv_head_Step_2

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