Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_sousborg_egg_boil_generator_Step_0

(view raw script w/o annotations or w/e)
1
if (live_call())
2
    return global.live_result;
3
var box = 3154;
4
switch (scene)
5
{
6
    case 0:
7
        if (egg.image_alpha < 0.99)
8
            egg.image_alpha = lerp(egg.image_alpha, 1, 0.3);
9
        else
10
            cutscene_advance();
11
        break;
12
    case 1:
13
        cutscene_wait(1);
14
        break;
15
        break;
16
    case 2:
17
        for (var i = 0; i < array_length(attack_interval_current); i++)
18
        {
19
            attack_interval_current[i] -= 1;
20
            if (attack_interval_current[i] <= 0)
21
            {
22
                xx[i] = irandom_range(box.bbox_left + 20, box.bbox_right - 20);
23
                if (i > 0)
24
                {
25
                    xx[i] = xx[i - 1] + 50;
26
                    if (xx[i] > (box.bbox_right - 20))
27
                        xx[i] = xx[i - 1] - 50;
28
                }
29
                var yy = box.bbox_bottom + 40;
30
                instance_create_depth(xx[i], yy, box.depth - 1, obj_battle_enemy_attack_sousborg_egg_boil_smoke);
31
                attack_interval_current[i] = attack_interval;
32
            }
33
        }
34
        cutscene_wait(4.5);
35
        break;
36
    case 3:
37
        egg = instance_create_depth(320, box.bbox_bottom - 4, egg.depth - 10, obj_battle_enemy_attack_sousborg_egg_fire);
38
        instance_destroy(obj_battle_enemy_attack_sousborg_egg_boil);
39
        with (egg)
40
        {
41
            image_xscale = 2;
42
            image_yscale = 2;
43
            image_speed = 1;
44
            image_alpha = 1;
45
        }
46
        audio_play_sound(snd_sousborg_egg_fire, 1, 0);
47
        audio_stop_sound(snd_sousborg_egg_sizzle);
48
        audio_play_sound(snd_sousborg_egg_fire_loop, 1, 1);
49
        cutscene_advance();
50
        break;
51
    case 4:
52
        cutscene_wait(0.2);
53
        break;
54
        break;
55
    case 5:
56
        for (var i = 0; i < array_length(attack_interval_fire); i++)
57
        {
58
            attack_interval_fire[i] -= 1;
59
            if (attack_interval_fire[i] <= 0)
60
            {
61
                xx[i] = irandom_range(box.bbox_left + 20, box.bbox_right - 20);
62
                if (i > 0)
63
                {
64
                    xx[i] = xx[i - 1] + 50;
65
                    if (xx[i] > (box.bbox_right - 20))
66
                        xx[i] = xx[i - 1] - 50;
67
                }
68
                var yy = box.bbox_bottom + 40;
69
                instance_create_depth(xx[i], yy, box.depth - 1, obj_battle_enemy_attack_sousborg_egg_boil_fireball);
70
                attack_interval_fire[i] = attack_interval;
71
            }
72
        }
73
        cutscene_wait(4.5);
74
        break;
75
    case 6:
76
        instance_destroy();
77
        audio_stop_sound(snd_sousborg_egg_fire_loop);
78
        break;
79
}