Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_quote_battle_martlet_genocide_either_parent_Step_0

(view raw script w/o annotations or w/e)
1
script_execute(gml_Script_scr_controls_text)
2
if (transforming == false)
3
{
4
    if key_revert_pressed
5
    {
6
        characters = message_length
7
        message_draw = string_copy(message[message_current], 0, characters)
8
    }
9
    if (characters < message_length)
10
    {
11
        if (counter == 0)
12
        {
13
            script_execute(gml_Script_scr_text_increase)
14
            script_execute(gml_Script_scr_talking_martlet)
15
        }
16
        else
17
            can_talk = false
18
    }
19
    else
20
    {
21
        can_talk = false
22
        if key_select_pressed
23
        {
24
            if (message_current < message_end)
25
            {
26
                message_current += 1
27
                message_length = string_length(message[message_current])
28
                characters = 0
29
                message_draw = ""
30
            }
31
            else if (transform == true)
32
            {
33
                instance_create(obj_martlet_g_body.x, obj_martlet_g_body.y, obj_martlet_g_fight_mode)
34
                with (obj_quote_bubble_battle)
35
                    instance_destroy()
36
                transforming = true
37
            }
38
            else
39
            {
40
                if (attack == true)
41
                {
42
                    with (obj_heart_battle_fighting_parent)
43
                        moveable = true
44
                }
45
                else
46
                    script_execute(gml_Script_scr_martlet_genocide_no_attack)
47
                with (obj_quote_bubble_battle)
48
                    instance_destroy()
49
                instance_destroy()
50
            }
51
        }
52
    }
53
    script_execute(gml_Script_scr_text_counter)
54
}
55
if (transforming == true && (!instance_exists(obj_martlet_g_fight_mode)))
56
{
57
    if (attack == true)
58
    {
59
        with (obj_heart_battle_fighting_parent)
60
            moveable = true
61
    }
62
    else
63
        script_execute(gml_Script_scr_martlet_genocide_no_attack)
64
    instance_destroy()
65
}