Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_martlet_attack_wing_feather_Create_0

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
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")
4
state = 0
5
alarm[0] = 1
alarm[0]

if live_call() return global.live_result; state = 1 image_angle = direction - 180 image_alpha = 1 if (!audio_is_playing(snd_mart_feather_atk3)) { var shoot_sound = audio_play_sound(snd_mart_feather_atk3, 20, 0) audio_sound_set_track_position(shoot_sound, 0.7) }
6
fall_speed = irandom_range(3, 5)
7
x_point = x
8
y_point = y
9
starting_position_x = x
10
starting_position_y = y
11
animation_disjoint_x = 0
12
animation_disjoint_y = 0
13
can_move = false
14
explosion_angle = 0
15
var random_number = irandom_range(1, 3)
16
switch random_number
17
{
18
    case 1:
19
        sprite_index = spr_battle_enemy_attack_martlet_feather_1
20
        break
21
    case 2:
22
        sprite_index = spr_battle_enemy_attack_martlet_feather_2
23
        break
24
    case 3:
25
        sprite_index = spr_battle_enemy_attack_martlet_feather_3
26
        break
27
    case 4:
28
        sprite_index = spr_battle_enemy_attack_martlet_feather_4
29
        break
30
    case 5:
31
        sprite_index = spr_battle_enemy_attack_martlet_feather_5
32
        break
33
    default:
34
        sprite_index = spr_battle_enemy_attack_martlet_feather_1
35
}
36
37
image_speed = 0
38
image_index = 0
39
image_alpha = 0
40
random_number = irandom_range(0, 1)
41
if (random_number == 0)
42
    random_number = -1
43
sign_modifier = random_number
44
time_elapsed = 0
45
time_max = 30 + 15 * (fall_speed - 1)
46
time_increase = 1
47
max_rise = 10 * fall_speed * (irandom_range(1, 2))
48
time_elapsed_increase_fall = round(time_max / 3)
49
spin_speed = 25
50
no_loop_spin = false
51
attack_speed = 10
52
in_box = false
53
x_list = ds_list_create()
54
y_list = ds_list_create()
55
angle_list = ds_list_create()
56
max_points_trail = 10
57
trail_sprite = sprite_index
58
trail_cc_max = 3
59
trail_cc_start = trail_cc_max - 1
60
trail_cc_current = -1
61
feather_targetted = true
62
feather_create_count = 7