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
    exit;
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
var xx, yy;
16
switch (current_position)
17
{
18
    case 1:
19
        xx = 200;
20
        yy = obj_dialogue_box_battle_transformation_any.bbox_top - 40;
21
        break;
22
    case 2:
23
        xx = 200;
24
        yy = obj_dialogue_box_battle_transformation_any.bbox_bottom + 40;
25
        break;
26
    case 3:
27
        xx = 440;
28
        yy = obj_dialogue_box_battle_transformation_any.bbox_bottom + 40;
29
        break;
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;
gml_Object_obj_battle_enemy_attack_ceroba_split_spray_spawner_Alarm_0.gml

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
{
40
    alarm[0] = 1;
gml_Object_obj_battle_enemy_attack_ceroba_split_spray_spawner_Alarm_0.gml

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;
41
}