Deltarune script viewer

← back to main script listing

gml_GlobalScript_scr_findactorinstance

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

function scr_findactorinstance(arg0) { with (obj_cutscene_master) { __foundactor = -1; for (_jjj = 0; _jjj < 20; _jjj++) { if (actor_name[_jjj] == arg0 && i_ex(actor_id[_jjj])) __foundactor = actor_id[_jjj]; } return __foundactor; } }
(arg0)
2
{
3
    with (obj_cutscene_master)
4
    {
5
        __foundactor = -1;
6
        for (_jjj = 0; _jjj < 20; _jjj++)
7
        {
8
            if (actor_name[_jjj] == arg0 && i_ex(actor_id[_jjj]))
9
                __foundactor = actor_id[_jjj];
10
        }
11
        return __foundactor;
12
    }
13
}