Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_ceroba_shotgun_pacifist_checker_Alarm_0

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
var battle_box = obj_dialogue_box_battle_transformation_any
4
var battle_box_width = battle_box.sprite_width
5
var bullet_width = 8
6
var bullet_inc = battle_box_width / bullet_width
7
var excl = irandom_range(1, (battle_box_width / bullet_inc - 1))
8
dir_last = dir
9
var j = 0
10
var vsp = 0
11
var hsp = 0
12
for (var i = 16; i < (battle_box_width - 12); i += bullet_inc)
13
{
14
    j += 1
15
    if (j != excl)
16
    {
17
        switch dir
18
        {
19
            case "top":
20
                var xx = battle_box.bbox_left + i
21
                var yy = battle_box.bbox_top - 20
22
                vsp = 3
23
                break
24
            case "bottom":
25
                xx = battle_box.bbox_left + i
26
                yy = battle_box.bbox_bottom + 20
27
                vsp = -3
28
                break
29
            case "left":
30
                xx = battle_box.bbox_left - 20
31
                yy = battle_box.bbox_top + i
32
                hsp = 3
33
                break
34
            case "right":
35
                xx = battle_box.bbox_right + 20
36
                yy = battle_box.bbox_top + i
37
                hsp = -3
38
                break
39
        }
40
41
        show_debug_message(dir)
42
        var bullet = instance_create_depth(xx, yy, -100, obj_battle_enemy_attack_ceroba_flower_bullet_pacifist)
43
        bullet.vspeed = vsp
44
        bullet.hspeed = hsp
45
    }
46
}
47
alarm[0] = 35
alarm[0]

if live_call() return global.live_result; var battle_box = obj_dialogue_box_battle_transformation_any var battle_box_width = battle_box.sprite_width var bullet_width = 8 var bullet_inc = battle_box_width / bullet_width var excl = irandom_range(1, (battle_box_width / bullet_inc - 1)) dir_last = dir var j = 0 var vsp = 0 var hsp = 0 for (var i = 16; i < (battle_box_width - 12); i += bullet_inc) { j += 1 if (j != excl) { switch dir { case "top": var xx = battle_box.bbox_left + i var yy = battle_box.bbox_top - 20 vsp = 3 break case "bottom": xx = battle_box.bbox_left + i yy = battle_box.bbox_bottom + 20 vsp = -3 break case "left": xx = battle_box.bbox_left - 20 yy = battle_box.bbox_top + i hsp = 3 break case "right": xx = battle_box.bbox_right + 20 yy = battle_box.bbox_top + i hsp = -3 break } show_debug_message(dir) var bullet = instance_create_depth(xx, yy, -100, obj_battle_enemy_attack_ceroba_flower_bullet_pacifist) bullet.vspeed = vsp bullet.hspeed = hsp } } alarm[0] = 35