Undertale Yellow script viewer

← back to main script listing

gml_GlobalScript_cutscene_npc_reset_sprite

(view raw script w/o annotations or w/e)
1
function cutscene_npc_reset_sprite() //gml_Script_cutscene_npc_reset_sprite
2
{
3
    with (argument[0])
4
    {
5
        if (action_sprite == true)
6
        {
7
            action_sprite = false
8
            npc_direction = argument[1]
9
            image_index = 0
10
            switch npc_direction
11
            {
12
                case "right":
13
                    sprite_index = right_sprite_idle
14
                    break
15
                case "up":
16
                    sprite_index = up_sprite_idle
17
                    break
18
                case "left":
19
                    sprite_index = left_sprite_idle
20
                    break
21
                case "down":
22
                    sprite_index = down_sprite_idle
23
                    break
24
            }
25
26
        }
27
    }
28
    cutscene_advance()
29
    return true;
30
}