Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_flowey_world_lasers_Step_0

(view raw script w/o annotations or w/e)
1
if (lasers_activate)
2
{
3
    if (image_alpha < 1)
4
        image_alpha += 0.2;
5
    if (activate_delay > 0)
6
    {
7
        activate_delay -= 1;
8
    }
9
    else
10
    {
11
        audio_stop_sound(snd_switch);
12
        audio_play_sound(snd_switch, 1, 0);
13
        if (sprite_index != spr_hotland_lasers_on)
14
        {
15
            sprite_index = spr_hotland_lasers_on;
16
            image_index = 2;
17
        }
18
        else
19
        {
20
            sprite_index = spr_hotland_lasers_off;
21
        }
22
        activate_delay = activate_delay_max;
23
        activate_count -= 1;
24
    }
25
    if (activate_count <= 0)
26
    {
27
        audio_stop_sound(snd_switch);
28
        audio_play_sound(snd_switch, 1, 0);
29
        lasers_active = true;
30
        lasers_activate = false;
31
    }
32
}
33
if (lasers_active == true)
34
{
35
    if (image_speed != 1)
36
    {
37
        sprite_index = spr_hotland_lasers_on;
38
        image_index = 0;
39
        image_speed = 1;
40
    }
41
}