Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_ceroba_shotgun_pacifist_checker_Create_0

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
counter_current = 0
4
counter_max = 4
5
alarm[0] = 30
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
6
alarm[1] = 270
alarm[1]

if live_call() return global.live_result; instance_destroy()
7
dir = "empty"
8
dir_last = "empty_last"
9
scr_enable_battle_box_surface
scr_enable_battle_box_surface

function scr_enable_battle_box_surface() //gml_Script_scr_enable_battle_box_surface { if (!instance_exists(obj_surface_drawer)) instance_create_depth(0, 0, -999, obj_surface_drawer) }
()