Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_energy_balls_spin_creator_Alarm_0

(view raw script w/o annotations or w/e)
1
var battle_box = obj_dialogue_box_battle_transformation_any
2
var current_side = choose("hor", "ver")
3
if (current_side == "hor")
4
{
5
    var spawn_x = choose((battle_box.bbox_left - 80), (battle_box.bbox_right + 80))
6
    var spawn_y = irandom_range((battle_box.bbox_top - 80), (battle_box.bbox_bottom + 80))
7
}
8
else
9
{
10
    spawn_y = choose((battle_box.bbox_top - 80), (battle_box.bbox_bottom + 80))
11
    spawn_x = irandom_range((battle_box.bbox_left - 80), (battle_box.bbox_right + 80))
12
}
13
var ball = instance_create_depth(spawn_x, spawn_y, -100, obj_battle_enemy_attack_axis_energy_ball_boss)
14
ball.direction = point_direction(ball.x, ball.y, battle_box.x, battle_box.y)
15
ball.speed = 5
16
if (attack_count > 0)
17
{
18
    attack_count -= 1
19
    alarm[0] = attack_interval
alarm[0]

var battle_box = obj_dialogue_box_battle_transformation_any var current_side = choose("hor", "ver") if (current_side == "hor") { var spawn_x = choose((battle_box.bbox_left - 80), (battle_box.bbox_right + 80)) var spawn_y = irandom_range((battle_box.bbox_top - 80), (battle_box.bbox_bottom + 80)) } else { spawn_y = choose((battle_box.bbox_top - 80), (battle_box.bbox_bottom + 80)) spawn_x = irandom_range((battle_box.bbox_left - 80), (battle_box.bbox_right + 80)) } var ball = instance_create_depth(spawn_x, spawn_y, -100, obj_battle_enemy_attack_axis_energy_ball_boss) ball.direction = point_direction(ball.x, ball.y, battle_box.x, battle_box.y) ball.speed = 5 if (attack_count > 0) { attack_count -= 1 alarm[0] = attack_interval } else instance_destroy()
20
}
21
else
22
    instance_destroy()