Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_martlet_feather_fall_feather_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
fall_speed = irandom_range(3, 5)
4
x_point = x
5
y_point = y
6
angle_pos = 270
7
angle_pos_default = angle_pos
8
angle_pos_max = 15 * fall_speed
9
angle_radius = 10
10
starting_position_x = x
11
starting_position_y = y
12
animation_disjoint_x = 0
13
animation_disjoint_y = 0
14
can_move = false
15
explosion_angle = 0
16
if (!instance_exists(obj_martlet_body))
17
{
18
    var random_number = irandom_range(1, 3)
19
    explosion_angle = irandom_range(0, 359)
20
}
21
else
22
    random_number = irandom_range(1, 5)
23
switch random_number
24
{
25
    case 1:
26
        sprite_index = spr_battle_enemy_attack_martlet_feather_1
27
        break
28
    case 2:
29
        sprite_index = spr_battle_enemy_attack_martlet_feather_2
30
        break
31
    case 3:
32
        sprite_index = spr_battle_enemy_attack_martlet_feather_3
33
        break
34
    case 4:
35
        sprite_index = spr_battle_enemy_attack_martlet_feather_4
36
        break
37
    case 5:
38
        sprite_index = spr_battle_enemy_attack_martlet_feather_5
39
        break
40
    default:
41
        sprite_index = spr_battle_enemy_attack_martlet_feather_1
42
}
43
44
image_speed = 0
45
image_index = 0
46
image_alpha = 0
47
random_number = irandom_range(0, 1)
48
if (random_number == 0)
49
    random_number = -1
50
sign_modifier = random_number
51
time_elapsed = 0
52
time_max = 30 + 15 * (fall_speed - 1)
53
time_increase = 1
54
max_rise = 10 * fall_speed * (irandom_range(1, 2))
55
time_elapsed_increase_fall = round(time_max / 3)
56
spin_speed = 25
57
no_loop_spin = false
58
attack_speed = 28
59
in_box = false
60
x_list = ds_list_create()
61
y_list = ds_list_create()
62
angle_list = ds_list_create()
63
max_points_trail = 10
64
trail_sprite = sprite_index
65
trail_cc_max = 3
66
trail_cc_start = trail_cc_max - 1
67
trail_cc_current = trail_cc_start