Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_ceroba_phase_2_p2_obstacle_spawner_Step_0

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
if (!(scr_battle_box_resize_midfight
scr_battle_box_resize_midfight

function scr_battle_box_resize_midfight() //gml_Script_scr_battle_box_resize_midfight { if instance_exists(obj_dialogue_box_battle_transformation_any) { with (obj_dialogue_box_battle_transformation_any) { battle_box_resize_midfight = true battle_box_target_xscale = argument[0] / sprite_get_width(sprite_index) battle_box_target_yscale = argument[1] / sprite_get_height(sprite_index) if (argument_count > 2) { battle_box_target_x = argument[2] battle_box_target_y = argument[3] } if (abs(image_xscale - battle_box_target_xscale) < 0.01 && abs(image_yscale - battle_box_target_yscale) < 0.01 && abs(x - battle_box_target_x) < 0.1 && abs(y - battle_box_target_y) < 0.1) { var box = obj_dialogue_box_battle_transformation_any global.attack_surface_width = box.sprite_width - 8 global.attack_surface_height = box.sprite_height - 8 global.attack_surface_x = box.x - global.attack_surface_width * 0.5 global.attack_surface_y = box.y - global.attack_surface_height * 0.5 if surface_exists(global.attack_surface) global.attack_surface = surface_create(global.attack_surface_width, global.attack_surface_height) return true; } } } else return false; }
(75, 128)))
4
    return;
5
if (!alarm[0])
6
    alarm[0] = 15
alarm[0]

if live_call() return global.live_result; var battle_box = obj_dialogue_box_battle_transformation_any var side = choose(1, 2, 3) var xx = battle_box.bbox_left + 16 var xx2 = battle_box.bbox_right - 16 var xx3 = battle_box.x var yy = battle_box.bbox_top - 16 var obstacle1 = obj_ceroba_attack_fireball_obstacle var obstacle2 = obj_ceroba_attack_fireball_obstacle var obstacle3 = obj_ceroba_attack_fireball_obstacle var obstacle_speed = 5 if (global.hotland_flag[2] == 3) obstacle_speed = 6 switch side { case 1: obstacle1 = obj_ceroba_attack_bell_obstacle break case 2: obstacle2 = obj_ceroba_attack_bell_obstacle break case 3: obstacle3 = obj_ceroba_attack_bell_obstacle break } instance_create_depth(xx, yy, -50, obstacle1) instance_create_depth(xx2, yy, -50, obstacle2) instance_create_depth(xx3, yy, -50, obstacle3) with (obstacle1) { direction = 270 speed = obstacle_speed } with (obstacle2) { direction = 270 speed = obstacle_speed } with (obstacle3) { direction = 270 speed = obstacle_speed } alarm[0] = obstacle_offset