Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_axis_turrets_2_Alarm_0

(view raw script w/o annotations or w/e)
1
if (live_call())
2
    return global.live_result;
3
var battle_box = 3154;
4
var side = choose(1, 2, 3, 4);
5
var xx = battle_box.x;
6
var yy = battle_box.y;
7
switch (side)
8
{
9
    case 1:
10
        xx = battle_box.bbox_left - 20;
11
        yy = battle_box.bbox_top - 20;
12
        break;
13
    case 2:
14
        xx = battle_box.bbox_right + 20;
15
        yy = battle_box.bbox_top - 20;
16
        break;
17
    case 3:
18
        xx = battle_box.bbox_right + 20;
19
        yy = battle_box.bbox_bottom + 20;
20
        break;
21
    case 4:
22
        xx = battle_box.bbox_left - 20;
23
        yy = battle_box.bbox_bottom + 20;
24
        break;
25
}
26
var twinkle = instance_create_depth(xx, yy, -100, obj_battle_enemy_attack_axis_turret_twinkle_2);
27
twinkle.side = side;
28
turret_count--;
29
if (turret_count <= 0)
30
    instance_destroy();