Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_axis_turret_geno_Step_0

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
switch scene
4
{
5
    case 0:
6
        image_alpha += 0.2
7
        image_angle = direction - 180 + 180 * image_alpha
8
        if (image_alpha >= 1)
9
        {
10
            image_alpha = 1
11
            scene = 1
12
        }
13
        break
14
    case 1:
15
        break
16
    case 2:
17
        image_speed = 1
18
        var bullet = instance_create_depth(x, y, -100, obj_battle_enemy_attack_axis_turret_bullet_geno)
19
        var shootsnd = audio_play_sound(snd_arc_shoot, 1, 0)
20
        audio_sound_gain(shootsnd, 0.2, 0)
21
        bullet.direction = direction
22
        bullet.image_angle = bullet.direction
23
        bullet.speed = 8
24
        speed = -3
25
        shot_number--
26
        scene++
27
        break
28
    case 3:
29
        if cutscene_wait(0.15)
30
        {
31
            if (shot_number > 0)
32
                scene = 2
33
            else
34
                scene = 4
35
        }
36
        break
37
    case 4:
38
        image_alpha -= 0.1
39
        if (image_alpha <= 0)
40
            instance_destroy()
41
        break
42
}
43
44
speed = lerp(speed, 0, 0.2)