Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_martlet_feather_spiral_target_2_axis_Create_0

(view raw script w/o annotations or w/e)
1
image_speed = 0.6
2
image_index = 0
3
alarm[0] = 17
alarm[0]

instance_create(x, y, obj_battle_enemy_attack_martlet_feather_spiral_explosion) image_alpha = 0
4
alarm[1] = 20
alarm[1]

var random_number = irandom_range(1, 5) switch random_number { case 1: feather_sprite = spr_battle_enemy_attack_martlet_feather_1 break case 2: feather_sprite = spr_battle_enemy_attack_martlet_feather_2 break case 3: feather_sprite = spr_battle_enemy_attack_martlet_feather_3 break case 4: feather_sprite = spr_battle_enemy_attack_martlet_feather_4 break case 5: feather_sprite = spr_battle_enemy_attack_martlet_feather_5 break default: feather_sprite = spr_battle_enemy_attack_martlet_feather_1 } for (i = 0; i < fcreate_count; i += 1) { var fcreate_x = x + feather_radius * cos(degtorad(fcreate_angle_diff)) var fcreate_y = y - feather_radius * sin(degtorad(fcreate_angle_diff)) global.id_store = id instance_create(fcreate_x, fcreate_y, obj_battle_enemy_attack_martlet_feather_spiral_feather) id_feather[i] = global.id_store with (id_feather[i]) { sprite_index = id_target.feather_sprite image_index = 0 image_speed = 0 image_angle = id_target.fcreate_angle_diff trail_sprite = sprite_index } fcreate_angle_diff -= fcreate_decrease if (fcreate_angle_diff < 0) fcreate_angle_diff += 360 } can_spiral = true switch feather_sprite { case spr_battle_enemy_attack_martlet_feather_1: case 2274: case 2275: audio_play_sound(snd_mart_spiral_attack_2, 20, 0) break case 2276: case 2278: audio_play_sound(snd_mart_spiral_attack_1, 20, 0) break default: audio_play_sound(snd_mart_spiral_attack_1, 20, 0) }
5
feather_radius = 15
6
feather_radius_increase = 10
7
feather_angle_master = irandom_range(0, 360)
8
feather_angle_speed = 4
9
feather_alpha = 1
10
can_spiral = false
11
can_fade_out = false
12
fcreate_count = 4
13
fcreate_decrease = 360 / fcreate_count
14
fcreate_angle_diff = 0
15
warning_radius = feather_radius
16
warning_radius_increase = feather_radius_increase
17
warning_angle_master = feather_angle_master
18
warning_angle_speed = feather_angle_speed
19
warning_counter = 3
20
warning_multiplier = 5
21
for (i = 0; i < warning_counter; i += 1)
22
{
23
    warning_angle_master += (warning_angle_speed * warning_multiplier)
24
    if (warning_angle_master >= 360)
25
        warning_angle_master -= 360
26
    warning_radius += (warning_radius_increase * warning_multiplier)
27
    frotate_angle_diff = 0
28
    for (j = 0; j < fcreate_count; j += 1)
29
    {
30
        frotate_angle_use = frotate_angle_diff + warning_angle_master
31
        if (frotate_angle_use < 0)
32
            frotate_angle_use += 360
33
        else if (frotate_angle_use >= 360)
34
            frotate_angle_use -= 360
35
        frotate_x = x + warning_radius * cos(degtorad(frotate_angle_use))
36
        frotate_y = y - warning_radius * sin(degtorad(frotate_angle_use))
37
        if (!instance_exists(obj_battle_enemy_attack_martlet_feather_spiral_warning_master))
38
            instance_create(frotate_x, frotate_y, obj_battle_enemy_attack_martlet_feather_spiral_warning_master)
39
        else
40
            instance_create(frotate_x, frotate_y, obj_battle_enemy_attack_martlet_feather_spiral_warning_slave)
41
        frotate_angle_diff -= fcreate_decrease
42
        if (frotate_angle_diff < 0)
43
            frotate_angle_diff += 360
44
    }
45
}
46
image_angle = feather_angle_master