Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_starlo_guns_surround_checker_Step_0

(view raw script w/o annotations or w/e)
1
var counter_timer_max = 0
2
var player_soul = 2979
3
var box = obj_dialogue_box_battle_transformation_any
4
var gun_top_y = box.y - 25
5
var gun_mid_y = box.y
6
var gun_bot_y = box.y + 25
7
var gun_left_x = box.bbox_left - 60
8
var gun_right_x = box.bbox_right + 60
9
switch counter_current
10
{
11
    case 0:
12
        instance_create(gun_left_x, (gun_mid_y - 15), obj_battle_enemy_attack_starlo_guns_horizontal_gun)
13
        instance_create(gun_left_x, (gun_top_y - 15), obj_battle_enemy_attack_starlo_guns_horizontal_gun)
14
        instance_create(box.x, (box.bbox_bottom + 60), obj_battle_enemy_attack_starlo_guns_vertical_gun)
15
        instance_create((box.x + 30), (box.bbox_bottom + 60), obj_battle_enemy_attack_starlo_guns_vertical_gun)
16
        counter_current++
17
        break
18
    case 1:
19
        counter_timer_max = 45
20
        break
21
    case 2:
22
        instance_create(gun_left_x, gun_top_y, obj_battle_enemy_attack_starlo_guns_horizontal_gun)
23
        instance_create(gun_right_x, gun_bot_y, obj_battle_enemy_attack_starlo_guns_horizontal_gun)
24
        instance_create(box.x, (box.bbox_top - 60), obj_battle_enemy_attack_starlo_guns_vertical_gun)
25
        instance_create((box.x + 30), (box.bbox_top - 60), obj_battle_enemy_attack_starlo_guns_vertical_gun)
26
        counter_current++
27
        break
28
    case 3:
29
        counter_timer_max = 45
30
        break
31
    case 4:
32
        instance_create(gun_right_x, gun_mid_y, obj_battle_enemy_attack_starlo_guns_horizontal_gun)
33
        instance_create(gun_right_x, gun_bot_y, obj_battle_enemy_attack_starlo_guns_horizontal_gun)
34
        instance_create((box.x - 30), (box.bbox_bottom + 60), obj_battle_enemy_attack_starlo_guns_vertical_gun)
35
        instance_create((box.x + 30), (box.bbox_top - 60), obj_battle_enemy_attack_starlo_guns_vertical_gun)
36
        counter_current++
37
        break
38
    case 5:
39
        counter_timer_max = 45
40
        break
41
    case 6:
42
        instance_destroy()
43
        break
44
}
45
46
if (counter_timer_max == 0)
47
    return;
48
if (counter_timer < counter_timer_max)
49
    counter_timer++
50
else
51
{
52
    counter_timer = 0
53
    counter_current += 1
54
}