Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_transition_Step_0

(view raw script w/o annotations or w/e)
1
if (fadein == false)
2
    fadealpha += fade_in_speed
3
if (fadein == true)
4
{
5
    fadealpha -= fade_out_speed
6
    if (fadealpha <= 0)
7
        instance_destroy()
8
}
9
if (fadealpha >= 1)
10
{
11
    if (fade_wait_time > 0 && (!alarm[0]))
12
        alarm[0] = fade_wait_time
alarm[0]

fadein = true
13
    if (room == rm_battle)
14
    {
15
        with (obj_radio)
16
        {
17
            audio_resume_sound(bgm)
18
            audio_sound_gain(bgm, 0, 0)
19
            audio_sound_gain(bgm, 1, 2500)
20
        }
21
    }
22
    room_goto(newRoom)
23
    waiter = 1
24
    if instance_exists(obj_pl)
25
    {
26
        obj_pl.x = xx
27
        obj_pl.y = yy
28
        if (new_dir != -1)
29
            obj_pl.direction = new_dir
30
    }
31
    else
32
        instance_create(xx, yy, obj_pl)
33
    fadein = true
34
}