Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_martlet_attack_splitting_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 = 1
5
angle_destination = point_direction(x, y, obj_heart_battle_fighting_parent.x, obj_heart_battle_fighting_parent.y)
6
x_target_override = obj_heart_battle_fighting_parent.x
7
y_target_override = obj_heart_battle_fighting_parent.y
8
image_angle = angle_destination - 180
9
alarm[0] = 1
alarm[0]

if live_call() return global.live_result; x_destination = x_target_override y_destination = y_target_override angle_destination = point_direction(x, y, x_destination, y_destination) if (angle_difference(image_angle, angle_destination) > 0) spin_direction = 1 else spin_direction = -1 global.id_store = id with (instance_create_depth(x_destination, y_destination, -100, obj_martlet_attack_splitting_feather_target_axis)) geno_target_angle = other.explosion_angle id_target = global.id_store state = 1 switch sprite_index { case spr_battle_enemy_attack_martlet_feather_1: audio_play_sound(snd_mart_feather_atk3, 20, 0) break case 2274: case 2275: audio_play_sound(snd_mart_feather_atk1, 20, 0) break case 2276: case 2278: audio_play_sound(snd_mart_feather_atk2, 20, 0) break default: audio_play_sound(snd_mart_feather_atk1, 20, 0) }
10
fall_speed = irandom_range(3, 5)
11
x_point = x
12
y_point = y
13
angle_pos = 270
14
angle_pos_default = angle_pos
15
angle_pos_max = 15 * fall_speed
16
angle_radius = 10
17
starting_position_x = x
18
starting_position_y = y
19
animation_disjoint_x = 0
20
animation_disjoint_y = 0
21
can_move = false
22
explosion_angle = 0
23
if (!instance_exists(obj_martlet_body))
24
{
25
    var random_number = irandom_range(1, 3)
26
    explosion_angle = irandom_range(0, 359)
27
}
28
else
29
    random_number = irandom_range(1, 5)
30
switch random_number
31
{
32
    case 1:
33
        sprite_index = spr_battle_enemy_attack_martlet_feather_1
34
        break
35
    case 2:
36
        sprite_index = spr_battle_enemy_attack_martlet_feather_2
37
        break
38
    case 3:
39
        sprite_index = spr_battle_enemy_attack_martlet_feather_3
40
        break
41
    case 4:
42
        sprite_index = spr_battle_enemy_attack_martlet_feather_4
43
        break
44
    case 5:
45
        sprite_index = spr_battle_enemy_attack_martlet_feather_5
46
        break
47
    default:
48
        sprite_index = spr_battle_enemy_attack_martlet_feather_1
49
}
50
51
image_speed = 0
52
image_index = 0
53
image_alpha = 0
54
random_number = irandom_range(0, 1)
55
if (random_number == 0)
56
    random_number = -1
57
sign_modifier = random_number
58
time_elapsed = 0
59
time_max = 30 + 15 * (fall_speed - 1)
60
time_increase = 1
61
max_rise = 10 * fall_speed * (irandom_range(1, 2))
62
time_elapsed_increase_fall = round(time_max / 3)
63
spin_speed = 25
64
no_loop_spin = false
65
attack_speed = 28
66
in_box = false
67
x_list = ds_list_create()
68
y_list = ds_list_create()
69
angle_list = ds_list_create()
70
max_points_trail = 10
71
trail_sprite = sprite_index
72
trail_cc_max = 3
73
trail_cc_start = trail_cc_max - 1
74
trail_cc_current = trail_cc_start
75
feather_targetted = true
76
feather_create_count = 7
77
id_target = -4