Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_ceroba_opener_spray_spawner_Step_0

(view raw script w/o annotations or w/e)
1
if (attack_spray_state == 1)
2
{
3
    x += lengthdir_x(5, point_direction(x, y, obj_heart_battle_fighting_parent.x, obj_heart_battle_fighting_parent.y));
4
    y += lengthdir_y(5, point_direction(x, y, obj_heart_battle_fighting_parent.x, obj_heart_battle_fighting_parent.y));
5
    image_blend = c_white;
6
    if (attack_flower_timer < attack_flower_timer_max)
7
    {
8
        attack_flower_timer++;
9
    }
10
    else
11
    {
12
        image_blend = c_red;
13
        audio_play_sound(snd_bullet_warning, 1, 0);
14
        attack_flower_timer = 0;
15
        attack_flower_beep_count -= 1;
16
        if (attack_flower_beep_count <= 0)
17
            attack_spray_state += 1;
18
    }
19
    exit;
20
}
21
if (attack_spray_state == 2)
22
{
23
    instance_destroy();
24
    with (instance_create(x, y, obj_battle_enemy_attack_ceroba_opener_explosion))
25
        ring_object = 2725;
26
    exit;
27
}
28
if (image_alpha < 1)
29
    image_alpha += 0.1;
30
else if (!alarm[0])
31
    alarm[0] = 10;
gml_Object_obj_battle_enemy_attack_ceroba_opener_spray_spawner_Alarm_0.gml

if (attack_spray_state > 0) exit; 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;
32
if (image_xscale > 1)
33
    image_xscale -= 0.05;
34
if (image_yscale > 1)
35
    image_yscale -= 0.05;
36
var xx, yy;
37
switch (current_position)
38
{
39
    case 3:
40
        xx = 320;
41
        yy = 60;
42
        break;
43
    case 2:
44
        xx = 440;
45
        yy = 110;
46
        break;
47
    case 1:
48
        xx = 200;
49
        yy = 110;
50
        break;
51
}
52
x = lerp(x, xx, 0.5);
53
y = lerp(y, yy, 0.5);
54
if (round(x) != xx || (round(y) != yy && alarm[0] > 0))
gml_Object_obj_battle_enemy_attack_ceroba_opener_spray_spawner_Alarm_0.gml

if (attack_spray_state > 0) exit; 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;
55
    alarm[0] = -1;
gml_Object_obj_battle_enemy_attack_ceroba_opener_spray_spawner_Alarm_0.gml

if (attack_spray_state > 0) exit; 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;
56
else if (!alarm[0])
57
    alarm[0] = 1;
gml_Object_obj_battle_enemy_attack_ceroba_opener_spray_spawner_Alarm_0.gml

if (attack_spray_state > 0) exit; 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;