Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_flowey_battle_phase_2_controller_paper_Create_0

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
instance_create_depth(0, 0, (obj_flowey_battle_final.depth + 1), obj_flowey_battle_phase_2_vine_thick)
4
var vine2 = instance_create_depth(640, 0, (obj_flowey_battle_final.depth + 1), obj_flowey_battle_phase_2_vine_thick)
5
vine2.image_xscale = -1
6
instance_create_depth(16, -48, (obj_flowey_battle_final.depth + 3), obj_flowey_battle_phase_2_vine_spinny)
7
var spin2 = instance_create_depth(624, -48, (obj_flowey_battle_final.depth + 3), obj_flowey_battle_phase_2_vine_spinny)
8
spin2.spin_speed *= -1
9
var thorn_number = 10
10
var thorn_pos_multiplier = 0.1
11
var spawn_depth = obj_flowey_battle_final.depth + 2
12
var left_weakpoint_pos = "top"
13
var right_weakpoint_pos = "top"
14
var left_weakpoint_number = irandom_range(0, 4)
15
var right_weakpoint_number = irandom_range(5, 9)
16
for (var i = 0; i < thorn_number; i++)
17
{
18
    if (left_weakpoint_number == i && left_weakpoint_pos == "bottom")
19
        var thorn = instance_create_depth(0, 0, spawn_depth, obj_flowey_battle_phase_2_paper_weakpoint)
20
    else
21
        thorn = instance_create_depth(0, 0, spawn_depth, obj_flowey_battle_phase_2_paper_thorn)
22
    with (thorn)
23
    {
24
        path_start(pt_flowey_battle_phase_2_paper_left, 2, path_action_restart, true)
25
        path_position = thorn_pos_multiplier * i
26
    }
27
    if (left_weakpoint_number == i && left_weakpoint_pos == "top")
28
        thorn = instance_create_depth(0, 0, spawn_depth, obj_flowey_battle_phase_2_paper_weakpoint)
29
    else
30
        thorn = instance_create_depth(0, 0, spawn_depth, obj_flowey_battle_phase_2_paper_thorn)
31
    with (thorn)
32
    {
33
        path_start(pt_flowey_battle_phase_2_paper_left_top, 2, path_action_restart, true)
34
        path_position = thorn_pos_multiplier * 0.5 + thorn_pos_multiplier * i
35
    }
36
    if (right_weakpoint_number == i && right_weakpoint_pos == "bottom")
37
        thorn = instance_create_depth(0, 0, spawn_depth, obj_flowey_battle_phase_2_paper_weakpoint)
38
    else
39
        thorn = instance_create_depth(0, 0, spawn_depth, obj_flowey_battle_phase_2_paper_thorn)
40
    with (thorn)
41
    {
42
        path_start(pt_flowey_battle_phase_2_paper_right, 2, path_action_restart, true)
43
        path_position = thorn_pos_multiplier * i
44
    }
45
    if (right_weakpoint_number == i && right_weakpoint_pos == "top")
46
        thorn = instance_create_depth(0, 0, spawn_depth, obj_flowey_battle_phase_2_paper_weakpoint)
47
    else
48
        thorn = instance_create_depth(0, 0, spawn_depth, obj_flowey_battle_phase_2_paper_thorn)
49
    with (thorn)
50
    {
51
        path_start(pt_flowey_battle_phase_2_paper_right_top, 2, path_action_restart, true)
52
        path_position = thorn_pos_multiplier * 0.5 + thorn_pos_multiplier * i
53
    }
54
}
55
instance_create_depth(0, 0, -100, obj_flowey_battle_paper_plane_spawner)
56
instance_create_depth(0, 0, -100, obj_flowey_battle_paper_ball_spawner)
57
instance_create_depth(0, 0, -100, obj_flowey_battle_paper_ball_thrown_spawner)
58
destroy_noloop = false