Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_flowey_battle_phase_2_paper_weakpoint_Step_0

(view raw script w/o annotations or w/e)
1
event_inherited()
2
if (hp_self <= 0)
3
{
4
    if (jump_noloop == false)
5
    {
6
        path_end()
7
        audio_play_sound(snd_monster_damage_hit_critical, 1, 0)
8
        jump_noloop = true
9
        vspeed = 4
10
        gravity = 0.5
11
        image_speed = 0
12
    }
13
    image_alpha -= 0.04
14
    if (image_alpha <= 0)
15
        instance_destroy()
16
}
17
if live_call()
18
    return global.live_result;
19
switch path_index
20
{
21
    case pt_flowey_battle_phase_2_paper_right:
22
        image_angle = direction + 90
23
        break
24
    case 3:
25
        image_angle = direction - 90
26
        break
27
    case 7:
28
        image_angle = direction - 90
29
        break
30
    case 59:
31
        image_angle = direction + 90
32
        break
33
}
34
35
path_speed = 4
36
if (path_position > 0.5)
37
{
38
    with (obj_flowey_battle_phase_2_paper_thorn)
39
    {
40
        if (path_index == other.path_index)
41
        {
42
            if (path_position > 0.9)
43
            {
44
                var old_pos = other.path_position
45
                other.path_position = path_position
46
                path_position = old_pos
47
            }
48
        }
49
    }
50
}