Undertale Yellow script viewer

← back to main script listing

gml_GlobalScript_scr_actor_into_follower

(view raw script w/o annotations or w/e)
1
function scr_actor_into_follower
scr_actor_into_follower

function scr_actor_into_follower(argument0, argument1) //gml_Script_scr_actor_into_follower { if (!instance_exists(argument0)) return false; if (argument1 == noone) return false; instance_create(argument0.x, argument0.y, argument1) argument1.x = argument0.x argument1.y = argument0.y with (argument0) { switch npc_direction { case "up": argument1.sprite_index = argument1.up_sprite_idle break case "down": argument1.sprite_index = argument1.down_sprite_idle break case "left": argument1.sprite_index = argument1.left_sprite_idle break case "right": argument1.sprite_index = argument1.right_sprite_idle break } } instance_destroy(argument0) }
(argument0, argument1) //gml_Script_scr_actor_into_follower
2
{
3
    if (!instance_exists(argument0))
4
        return false;
5
    if (argument1 == noone)
6
        return false;
7
    instance_create(argument0.x, argument0.y, argument1)
8
    argument1.x = argument0.x
9
    argument1.y = argument0.y
10
    with (argument0)
11
    {
12
        switch npc_direction
13
        {
14
            case "up":
15
                argument1.sprite_index = argument1.up_sprite_idle
16
                break
17
            case "down":
18
                argument1.sprite_index = argument1.down_sprite_idle
19
                break
20
            case "left":
21
                argument1.sprite_index = argument1.left_sprite_idle
22
                break
23
            case "right":
24
                argument1.sprite_index = argument1.right_sprite_idle
25
                break
26
        }
27
28
    }
29
    instance_destroy(argument0)
30
}