Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_axis_turrets_3_Alarm_1

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
with (obj_battle_enemy_attack_axis_turret_fake)
4
    destroy_self = true
5
with (obj_battle_enemy_attack_axis_turret_real)
6
    can_shoot = true
7
alarm[0] = attack_interval
alarm[0]

if live_call() return global.live_result; var battle_box = obj_dialogue_box_battle_transformation_any var dir = irandom_range(0, 359) var dir_inc = (360/7) var real_turret = irandom_range(0, 6) for (var i = 0; i < 7; i++) { var distance = irandom_range(100, 140) if (i != real_turret) instance_create_depth((battle_box.x + (lengthdir_x(distance, (dir + dir_inc * i)))), (battle_box.y + (lengthdir_y(distance, (dir + dir_inc * i)))), -100, obj_battle_enemy_attack_axis_turret_fake) else instance_create_depth((battle_box.x + (lengthdir_x(distance, (dir + dir_inc * i)))), (battle_box.y + (lengthdir_y(distance, (dir + dir_inc * i)))), -100, obj_battle_enemy_attack_axis_turret_real) } alarm[1] = attack_offset turret_wave-- if (turret_wave <= 0) instance_destroy()