Deltarune (Chapter 5) script viewer

← back to main script listing

gml_GlobalScript_scr_configure_platmode_act

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

function
scr_configure_platmode_act(arg0, arg1, arg2, arg3)
{ var helper = instance_create(x, y, obj_plat_targethelper); helper.owner = self; helper.effect = arg0; helper.char = arg1; helper.objectname = arg2; helper.description = arg3; if (!variable_instance_exists(id, "__plat_acts")) __plat_acts = []; array_push(__plat_acts, helper); return helper; } function scr_set_platmode_act_active(arg0, arg1 = "*") { if (variable_instance_exists(id, "__plat_acts")) { for (var i = 0; i < array_length(__plat_acts); i++) { if (arg1 == "*" || __plat_acts.char == arg1) active = arg0; } } } function scr_destroy_platmode_act() { if (variable_instance_exists(id, "__plat_acts")) { for (var i = 0; i < array_length(__plat_acts); i++) { with (__plat_acts[i]) instance_destroy(); } } }
(arg0, arg1, arg2, arg3)
2
{
3
    var helper = instance_create(x, y, obj_plat_targethelper);
4
    helper.owner = self;
5
    helper.effect = arg0;
6
    helper.char = arg1;
7
    helper.objectname = arg2;
8
    helper.description = arg3;
9
    if (!variable_instance_exists(id, "__plat_acts"))
10
        __plat_acts = [];
11
    array_push(__plat_acts, helper);
12
    return helper;
13
}
14
15
function scr_set_platmode_act_active(arg0, arg1 = "*")
16
{
17
    if (variable_instance_exists(id, "__plat_acts"))
18
    {
19
        for (var i = 0; i < array_length(__plat_acts); i++)
20
        {
21
            if (arg1 == "*" || __plat_acts.char == arg1)
22
                active = arg0;
23
        }
24
    }
25
}
26
27
function scr_destroy_platmode_act()
28
{
29
    if (variable_instance_exists(id, "__plat_acts"))
30
    {
31
        for (var i = 0; i < array_length(__plat_acts); i++)
32
        {
33
            with (__plat_acts[i])
34
                instance_destroy();
35
        }
36
    }
37
}