Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_martlet_feather_flow_vertical_Create_0

(view raw script w/o annotations or w/e)
1
damage_number = scr_determine_damage_number_enemy
scr_determine_damage_number_enemy

function scr_determine_damage_number_enemy(argument0, argument1, argument2) //gml_Script_scr_determine_damage_number_enemy { var enemy_count = global.enemy_count if (global.battle_enemy_name_1 == argument0) return 1; else if (enemy_count >= 2 && global.battle_enemy_name_2 == argument1) return 2; else if (enemy_count >= 3 && global.battle_enemy_name_3 == argument2) return 3; else return 0; }
("martlet", "void", "void")
2
state = 0
3
fly_speed = irandom_range(3, 5)
4
x_point = x
5
y_point = y
6
if (y < 320)
7
    angle = 270
8
else
9
    angle = 90
10
angle_movement = choose(-1, 1)
11
angle_max = angle + 45
12
angle_min = angle - 45
13
angle_sway = 3
14
feather_explode_counter = 0
15
feather_explode_timer = 10
16
can_move = false
17
fade_out = false
18
if (!instance_exists(obj_martlet_body))
19
{
20
    var random_number = irandom_range(1, 3)
21
    alarm[1] = 45 * (3 / fly_speed)
alarm[1]

if (image_blend == c_red) image_blend = c_white else { audio_play_sound(snd_bullet_warning, 1, 0) image_blend = c_red feather_explode_counter += 1 } alarm[1] = 3 if (feather_explode_counter > 3) { var i = 1 var angle_base = irandom_range(0, 359) while (i <= 3) { with (instance_create(x, y, obj_battle_enemy_attack_martlet_feather_flow_explosion)) angle = angle_base + 120 * i i++ } audio_play_sound(snd_mart_spiral_attack_2, 1, 0) instance_destroy() }
22
}
23
else
24
    random_number = irandom_range(1, 5)
25
switch random_number
26
{
27
    case 1:
28
        sprite_index = spr_battle_enemy_attack_martlet_feather_1
29
        break
30
    case 2:
31
        sprite_index = spr_battle_enemy_attack_martlet_feather_2
32
        break
33
    case 3:
34
        sprite_index = spr_battle_enemy_attack_martlet_feather_3
35
        break
36
    case 4:
37
        sprite_index = spr_battle_enemy_attack_martlet_feather_4
38
        break
39
    case 5:
40
        sprite_index = spr_battle_enemy_attack_martlet_feather_5
41
        break
42
    default:
43
        sprite_index = spr_battle_enemy_attack_martlet_feather_1
44
}
45
46
image_speed = 0
47
image_index = 0
48
image_alpha = 0
49
image_angle = angle
50
alarm[0] = 90 * (3 / fly_speed)
alarm[0]

fade_out = true