Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_ceroba_phase_2_p1_lanterns_Alarm_0

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
if (ds_list_size(position_list) <= 0)
4
{
5
    if (!alarm[1])
6
        alarm[1] = 180
alarm[1]

instance_destroy()
7
    return;
8
}
9
var ds_list_pos = irandom_range(0, (ds_list_size(position_list) - 1))
10
var position_current = ds_list_find_value(position_list, ds_list_pos)
11
ds_list_delete(position_list, ds_list_pos)
12
switch position_current
13
{
14
    case 1:
15
        var xx = battle_box.bbox_left + 20
16
        var yy = battle_box.bbox_top - 20
17
        break
18
    case 2:
19
        xx = battle_box.x
20
        yy = battle_box.bbox_top - 50
21
        break
22
    case 3:
23
        xx = battle_box.bbox_right - 20
24
        yy = battle_box.bbox_top - 20
25
        break
26
}
27
28
instance_create_depth(xx, yy, -100, obj_ceroba_phase_2_p1_lantern)
29
alarm[0] = 30
alarm[0]

if live_call() return global.live_result; if (ds_list_size(position_list) <= 0) { if (!alarm[1]) alarm[1] = 180 return; } var ds_list_pos = irandom_range(0, (ds_list_size(position_list) - 1)) var position_current = ds_list_find_value(position_list, ds_list_pos) ds_list_delete(position_list, ds_list_pos) switch position_current { case 1: var xx = battle_box.bbox_left + 20 var yy = battle_box.bbox_top - 20 break case 2: xx = battle_box.x yy = battle_box.bbox_top - 50 break case 3: xx = battle_box.bbox_right - 20 yy = battle_box.bbox_top - 20 break } instance_create_depth(xx, yy, -100, obj_ceroba_phase_2_p1_lantern) alarm[0] = 30