Deltarune (Chapter 5) script viewer

← back to main script listing

gml_GlobalScript_scr_partner_abilities

(view raw script w/o annotations or w/e)
1
function scr_plat_ralsei_attach(arg0 = self, arg1, arg2, arg3 = -4)
2
{
3
    with (obj_plat_follower)
4
    {
5
        if (name == "ralsei")
6
            turn_into_platform(arg0, arg1, arg2, arg3);
7
    }
8
}
9
10
function scr_plat_susie_attack(arg0 = self, arg1 = true, arg2 = 0, arg3 = 120)
11
{
12
    with (obj_plat_follower)
13
    {
14
        if (name == "susie")
15
            force_attack_target(arg0, arg1, false, arg2, arg3);
16
    }
17
}
18
19
function scr_plat_susie_attack_fast(arg0 = self, arg1 = true, arg2 = 0, arg3 = 120)
20
{
21
    with (obj_plat_follower)
22
    {
23
        if (name == "susie")
24
            force_attack_target(arg0, arg1, true, arg2, arg3);
25
    }
26
}
27
28
function scr_plat_ralsei_heal(arg0 = self, arg1 = false)
29
{
30
    with (obj_plat_follower)
31
    {
32
        if (name == "ralsei")
33
            force_heal_target(arg0, arg1, false);
34
    }
35
}
36
37
function scr_plat_ralsei_heal_fast(arg0 = self, arg1 = false)
38
{
39
    with (obj_plat_follower)
40
    {
41
        if (name == "ralsei")
42
            force_heal_target(arg0, arg1, true);
43
    }
44
}
45
46
function scr_plat_set_cooldown(arg0 = "COOLDOWN", arg1 = 100)
47
{
48
    act_busy = true;
49
    with (instance_create(0, 0, obj_plat_cooldown_bar))
50
    {
51
        text = arg0;
52
        cooldown_timer = arg1;
53
        image_blend = other.outlinecolor;
54
        target = other;
55
    }
56
}
57
58
function scr_plat_can_act(arg0)
59
{
60
    switch (arg0)
61
    {
62
        case "susie":
63
        case "su":
64
            with (obj_plat_follower)
65
            {
66
                if (name == "susie" && (attacking > 0 || forced_anim || act_busy))
67
                    return false;
68
            }
69
            break;
70
        case "ralsei":
71
        case "ra":
72
            with (obj_plat_follower)
73
            {
74
                if (name == "ralsei" && ((forced_anim && !platform_valid && is_platform_mode != 3) || act_busy))
75
                    return false;
76
            }
77
            break;
78
    }
79
    return true;
80
}