Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_ceroba_phase_2_p2_spawner_mask_Alarm_0

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
if (attack_stop == true)
4
{
5
    with (obj_ceroba_attack_bullet_trail_mask)
6
        scene = 2
7
    return;
8
}
9
var xx = 0
10
var yy = 0
11
var spawn_corner = irandom_range(1, 4)
12
var spawn_direction = 0
13
switch spawn_corner
14
{
15
    case 1:
16
        xx = battle_box.bbox_left - 18
17
        yy = battle_box.bbox_top - 18
18
        var spawn_direction_1 = 0
19
        var spawn_direction_2 = 270
20
        break
21
    case 2:
22
        xx = battle_box.bbox_right + 18
23
        yy = battle_box.bbox_top - 18
24
        spawn_direction_1 = 180
25
        spawn_direction_2 = 270
26
        break
27
    case 3:
28
        xx = battle_box.bbox_left - 18
29
        yy = battle_box.bbox_bottom + 18
30
        spawn_direction_1 = 0
31
        spawn_direction_2 = 90
32
        break
33
    case 4:
34
        xx = battle_box.bbox_right + 18
35
        yy = battle_box.bbox_bottom + 18
36
        spawn_direction_1 = 180
37
        spawn_direction_2 = 90
38
        break
39
}
40
41
do
42
{
43
    spawn_direction = choose(spawn_direction_1, spawn_direction_2)
44
} until (spawn_corner_last != spawn_corner || spawn_direction != spawn_direction_last);
45
if (spawn_corner_last != spawn_corner && ((spawn_corner < 3 && spawn_corner_last < 3) || (spawn_corner > 2 && spawn_corner_last > 2)))
46
{
47
    if (spawn_direction == spawn_direction_1)
48
        spawn_direction = spawn_direction_2
49
    else
50
        spawn_direction = spawn_direction_1
51
}
52
spawn_corner_last = spawn_corner
53
spawn_direction_last = spawn_direction
54
mask = instance_create_depth(xx, yy, -100, obj_ceroba_attack_bullet_trail_mask)
55
with (mask)
56
    direction = spawn_direction
57
alarm[0] = 30
alarm[0]

if live_call() return global.live_result; if (attack_stop == true) { with (obj_ceroba_attack_bullet_trail_mask) scene = 2 return; } var xx = 0 var yy = 0 var spawn_corner = irandom_range(1, 4) var spawn_direction = 0 switch spawn_corner { case 1: xx = battle_box.bbox_left - 18 yy = battle_box.bbox_top - 18 var spawn_direction_1 = 0 var spawn_direction_2 = 270 break case 2: xx = battle_box.bbox_right + 18 yy = battle_box.bbox_top - 18 spawn_direction_1 = 180 spawn_direction_2 = 270 break case 3: xx = battle_box.bbox_left - 18 yy = battle_box.bbox_bottom + 18 spawn_direction_1 = 0 spawn_direction_2 = 90 break case 4: xx = battle_box.bbox_right + 18 yy = battle_box.bbox_bottom + 18 spawn_direction_1 = 180 spawn_direction_2 = 90 break } do { spawn_direction = choose(spawn_direction_1, spawn_direction_2) } until (spawn_corner_last != spawn_corner || spawn_direction != spawn_direction_last); if (spawn_corner_last != spawn_corner && ((spawn_corner < 3 && spawn_corner_last < 3) || (spawn_corner > 2 && spawn_corner_last > 2))) { if (spawn_direction == spawn_direction_1) spawn_direction = spawn_direction_2 else spawn_direction = spawn_direction_1 } spawn_corner_last = spawn_corner spawn_direction_last = spawn_direction mask = instance_create_depth(xx, yy, -100, obj_ceroba_attack_bullet_trail_mask) with (mask) direction = spawn_direction alarm[0] = 30 if (global.hotland_flag[2] == 2) alarm[0] = 25 if (global.hotland_flag[2] == 3) alarm[0] = 20
58
if (global.hotland_flag[2] == 2)
59
    alarm[0] = 25
alarm[0]

if live_call() return global.live_result; if (attack_stop == true) { with (obj_ceroba_attack_bullet_trail_mask) scene = 2 return; } var xx = 0 var yy = 0 var spawn_corner = irandom_range(1, 4) var spawn_direction = 0 switch spawn_corner { case 1: xx = battle_box.bbox_left - 18 yy = battle_box.bbox_top - 18 var spawn_direction_1 = 0 var spawn_direction_2 = 270 break case 2: xx = battle_box.bbox_right + 18 yy = battle_box.bbox_top - 18 spawn_direction_1 = 180 spawn_direction_2 = 270 break case 3: xx = battle_box.bbox_left - 18 yy = battle_box.bbox_bottom + 18 spawn_direction_1 = 0 spawn_direction_2 = 90 break case 4: xx = battle_box.bbox_right + 18 yy = battle_box.bbox_bottom + 18 spawn_direction_1 = 180 spawn_direction_2 = 90 break } do { spawn_direction = choose(spawn_direction_1, spawn_direction_2) } until (spawn_corner_last != spawn_corner || spawn_direction != spawn_direction_last); if (spawn_corner_last != spawn_corner && ((spawn_corner < 3 && spawn_corner_last < 3) || (spawn_corner > 2 && spawn_corner_last > 2))) { if (spawn_direction == spawn_direction_1) spawn_direction = spawn_direction_2 else spawn_direction = spawn_direction_1 } spawn_corner_last = spawn_corner spawn_direction_last = spawn_direction mask = instance_create_depth(xx, yy, -100, obj_ceroba_attack_bullet_trail_mask) with (mask) direction = spawn_direction alarm[0] = 30 if (global.hotland_flag[2] == 2) alarm[0] = 25 if (global.hotland_flag[2] == 3) alarm[0] = 20
60
if (global.hotland_flag[2] == 3)
61
    alarm[0] = 20
alarm[0]

if live_call() return global.live_result; if (attack_stop == true) { with (obj_ceroba_attack_bullet_trail_mask) scene = 2 return; } var xx = 0 var yy = 0 var spawn_corner = irandom_range(1, 4) var spawn_direction = 0 switch spawn_corner { case 1: xx = battle_box.bbox_left - 18 yy = battle_box.bbox_top - 18 var spawn_direction_1 = 0 var spawn_direction_2 = 270 break case 2: xx = battle_box.bbox_right + 18 yy = battle_box.bbox_top - 18 spawn_direction_1 = 180 spawn_direction_2 = 270 break case 3: xx = battle_box.bbox_left - 18 yy = battle_box.bbox_bottom + 18 spawn_direction_1 = 0 spawn_direction_2 = 90 break case 4: xx = battle_box.bbox_right + 18 yy = battle_box.bbox_bottom + 18 spawn_direction_1 = 180 spawn_direction_2 = 90 break } do { spawn_direction = choose(spawn_direction_1, spawn_direction_2) } until (spawn_corner_last != spawn_corner || spawn_direction != spawn_direction_last); if (spawn_corner_last != spawn_corner && ((spawn_corner < 3 && spawn_corner_last < 3) || (spawn_corner > 2 && spawn_corner_last > 2))) { if (spawn_direction == spawn_direction_1) spawn_direction = spawn_direction_2 else spawn_direction = spawn_direction_1 } spawn_corner_last = spawn_corner spawn_direction_last = spawn_direction mask = instance_create_depth(xx, yy, -100, obj_ceroba_attack_bullet_trail_mask) with (mask) direction = spawn_direction alarm[0] = 30 if (global.hotland_flag[2] == 2) alarm[0] = 25 if (global.hotland_flag[2] == 3) alarm[0] = 20