Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_ceroba_flower_spray_spawner_Step_0

(view raw script w/o annotations or w/e)
1
if (image_alpha < 1)
2
{
3
    image_alpha += 0.1
4
    return;
5
}
6
if (image_xscale > 1)
7
    image_xscale -= 0.05
8
if (image_yscale > 1)
9
    image_yscale -= 0.05
10
switch current_position
11
{
12
    case 1:
13
        var xx = 320
14
        var yy = 120
15
        break
16
    case 2:
17
        xx = 400
18
        yy = 150
19
        break
20
    case 3:
21
        xx = 240
22
        yy = 150
23
        break
24
}
25
26
x = lerp(x, xx, 0.5)
27
y = lerp(y, yy, 0.5)
28
if (x != xx || (y != yy && (alarm[0] > 0 || alarm[3] > 0)))
alarm[3]

audio_play_sound(snd_enemy_bullet_shot, 1, 0) var bullet = instance_create(x, y, obj_battle_enemy_attack_ceroba_flower_spray_bullet) bullet.speed = bullet_speed_alt bullet.direction = (point_direction(x, y, 320, 320)) + bullet_spread_alt if (bullet_spread_inc == true) { if (bullet_spread_alt < bullet_spread_alt_max) bullet_spread_alt += bullet_spread_amount else { bullet_spread_inc = false bullet_spread_alt -= (bullet_spread_amount / 2) } } else if (bullet_spread_alt > ((-bullet_spread_alt_max) - bullet_spread_amount / 2)) bullet_spread_alt -= bullet_spread_amount else { bullet_spread_inc = true bullet_spread_alt += (bullet_spread_amount / 2) } alarm[3] = 2 image_xscale = 1.5 image_yscale = 1.5
29
{
30
    alarm[0] = -1
alarm[0]

audio_play_sound(snd_enemy_bullet_shot, 1, 0) for (var a = 0; a < array_length_1d(bullet_number); a++) { for (var i = 0; i < bullet_number[a]; i++) { var bullet = instance_create(x, y, obj_battle_enemy_attack_ceroba_flower_spray_bullet) var bullet_arc = (bullet_number[a] - 1) * bullet_spread / 2 bullet.speed = bullet_speed[a] bullet.direction = (point_direction(x, y, 320, 320)) - bullet_arc + i * bullet_spread } } alarm[0] = 16 image_xscale = 1.5 image_yscale = 1.5
31
    alarm[3] = -1
alarm[3]

audio_play_sound(snd_enemy_bullet_shot, 1, 0) var bullet = instance_create(x, y, obj_battle_enemy_attack_ceroba_flower_spray_bullet) bullet.speed = bullet_speed_alt bullet.direction = (point_direction(x, y, 320, 320)) + bullet_spread_alt if (bullet_spread_inc == true) { if (bullet_spread_alt < bullet_spread_alt_max) bullet_spread_alt += bullet_spread_amount else { bullet_spread_inc = false bullet_spread_alt -= (bullet_spread_amount / 2) } } else if (bullet_spread_alt > ((-bullet_spread_alt_max) - bullet_spread_amount / 2)) bullet_spread_alt -= bullet_spread_amount else { bullet_spread_inc = true bullet_spread_alt += (bullet_spread_amount / 2) } alarm[3] = 2 image_xscale = 1.5 image_yscale = 1.5
32
}
33
else if ((!alarm[0]) && (!alarm[3]))
34
{
35
    if (bullet_pattern_current == 1 && global.battle_phase == 2)
36
        bullet_pattern_current = 2
37
    else
38
        bullet_pattern_current = 1
39
    if (bullet_pattern_current == 1 && (!alarm[0]))
40
        alarm[0] = 1
alarm[0]

audio_play_sound(snd_enemy_bullet_shot, 1, 0) for (var a = 0; a < array_length_1d(bullet_number); a++) { for (var i = 0; i < bullet_number[a]; i++) { var bullet = instance_create(x, y, obj_battle_enemy_attack_ceroba_flower_spray_bullet) var bullet_arc = (bullet_number[a] - 1) * bullet_spread / 2 bullet.speed = bullet_speed[a] bullet.direction = (point_direction(x, y, 320, 320)) - bullet_arc + i * bullet_spread } } alarm[0] = 16 image_xscale = 1.5 image_yscale = 1.5
41
    if (bullet_pattern_current == 2 && (!alarm[3]))
42
        alarm[3] = 1
alarm[3]

audio_play_sound(snd_enemy_bullet_shot, 1, 0) var bullet = instance_create(x, y, obj_battle_enemy_attack_ceroba_flower_spray_bullet) bullet.speed = bullet_speed_alt bullet.direction = (point_direction(x, y, 320, 320)) + bullet_spread_alt if (bullet_spread_inc == true) { if (bullet_spread_alt < bullet_spread_alt_max) bullet_spread_alt += bullet_spread_amount else { bullet_spread_inc = false bullet_spread_alt -= (bullet_spread_amount / 2) } } else if (bullet_spread_alt > ((-bullet_spread_alt_max) - bullet_spread_amount / 2)) bullet_spread_alt -= bullet_spread_amount else { bullet_spread_inc = true bullet_spread_alt += (bullet_spread_amount / 2) } alarm[3] = 2 image_xscale = 1.5 image_yscale = 1.5
43
}