Deltarune (Chapter 5) script viewer

← back to main script listing

gml_GlobalScript_scr_keyitemget

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

function
scr_keyitemget(arg0)
{ i = 0; loop = 0; noroom = 1; global.item[12] = 999; for (i = 0; i < 12; i++) { if (global.keyitem[i] == 0) { global.keyitem[i] = arg0; noroom = 0; break; } } script_execute(scr_keyiteminfo_all); }
(arg0)
2
{
3
    i = 0;
4
    loop = 0;
5
    noroom = 1;
6
    global.item[12] = 999;
7
    for (i = 0; i < 12; i++)
8
    {
9
        if (global.keyitem[i] == 0)
10
        {
11
            global.keyitem[i] = arg0;
12
            noroom = 0;
13
            break;
14
        }
15
    }
16
    script_execute(scr_keyiteminfo_all);
17
}