Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_ceroba_split_spray_spawner_Step_0

(view raw script w/o annotations or w/e)
1
if (stage == 1)
2
{
3
    if (image_alpha > 0)
4
        image_alpha -= 0.1
5
    else
6
        instance_destroy()
7
    return;
8
}
9
if (image_alpha < 1)
10
    image_alpha += 0.1
11
if (image_xscale > 1)
12
    image_xscale -= 0.05
13
if (image_yscale > 1)
14
    image_yscale -= 0.05
15
switch current_position
16
{
17
    case 1:
18
        var xx = 200
19
        var yy = obj_dialogue_box_battle_transformation_any.bbox_top - 40
20
        break
21
    case 2:
22
        xx = 200
23
        yy = obj_dialogue_box_battle_transformation_any.bbox_bottom + 40
24
        break
25
    case 3:
26
        xx = 440
27
        yy = obj_dialogue_box_battle_transformation_any.bbox_bottom + 40
28
        break
29
}
30
31
x = lerp(x, xx, 0.5)
32
y = lerp(y, yy, 0.5)
33
if (round(x) != round(xx) || round(y) != round(yy))
34
{
35
    if (alarm[0] > 0)
36
        alarm[0] = -1
alarm[0]

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 bullet.direction = (point_direction(x, y, 320, 320)) + bullet_spread if (bullet_spread_inc == true) { if (bullet_spread < bullet_spread_max) bullet_spread += bullet_spread_amount else { bullet_spread_inc = false bullet_spread -= (bullet_spread_amount / 2) } } else if (bullet_spread > ((-bullet_spread_max) - bullet_spread_amount / 2)) bullet_spread -= bullet_spread_amount else { bullet_spread_inc = true bullet_spread += (bullet_spread_amount / 2) } alarm[0] = 2 image_xscale = 1.5 image_yscale = 1.5
37
}
38
else if (!alarm[0])
39
    alarm[0] = 1
alarm[0]

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 bullet.direction = (point_direction(x, y, 320, 320)) + bullet_spread if (bullet_spread_inc == true) { if (bullet_spread < bullet_spread_max) bullet_spread += bullet_spread_amount else { bullet_spread_inc = false bullet_spread -= (bullet_spread_amount / 2) } } else if (bullet_spread > ((-bullet_spread_max) - bullet_spread_amount / 2)) bullet_spread -= bullet_spread_amount else { bullet_spread_inc = true bullet_spread += (bullet_spread_amount / 2) } alarm[0] = 2 image_xscale = 1.5 image_yscale = 1.5