Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_martlet_attack_splitting_feather_ext_checker_Alarm_0

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
var random_number = irandom_range(4, 5)
4
switch random_number
5
{
6
    case 4:
7
        feather_sprite = spr_battle_enemy_attack_martlet_feather_4
8
        break
9
    case 5:
10
        feather_sprite = spr_battle_enemy_attack_martlet_feather_5
11
        break
12
    default:
13
        feather_sprite = spr_battle_enemy_attack_martlet_feather_1
14
}
15
16
for (var i = 0; i < fcreate_count; i += 1)
17
{
18
    var fcreate_x = x + feather_radius * cos(degtorad(fcreate_angle_diff))
19
    var fcreate_y = y - feather_radius * sin(degtorad(fcreate_angle_diff))
20
    global.id_store = id
21
    instance_create_depth(fcreate_x, fcreate_y, -100, obj_battle_enemy_attack_martlet_genocide_feather_ext_feather_final)
22
    id_feather[i] = global.id_store
23
    with (id_feather[i])
24
    {
25
        sprite_index = other.feather_sprite
26
        image_index = 0
27
        image_speed = 0
28
        if (other.feather_targetted == true)
29
            image_angle = other.fcreate_angle - i * other.fcreate_decrease
30
        else
31
        {
32
            var image_angle_inc = 360 / other.fcreate_count
33
            image_angle = i * image_angle_inc
34
        }
35
        trail_sprite = sprite_index
36
    }
37
}
38
can_move = true
39
switch feather_sprite
40
{
41
    case spr_battle_enemy_attack_martlet_feather_1:
42
    case 2274:
43
    case 2275:
44
        audio_play_sound(snd_mart_spiral_attack_2, 20, 0)
45
        break
46
    case 2276:
47
    case 2278:
48
        audio_play_sound(snd_mart_spiral_attack_1, 20, 0)
49
        break
50
    default:
51
        audio_play_sound(snd_mart_spiral_attack_1, 20, 0)
52
}