Deltarune (Chapter 4) script viewer

← back to main script listing

gml_GlobalScript_scr_defeatrun

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

function
scr_defeatrun()
{ var __frozen; if (object_is_ancestor(object_index, obj_monsterparent)) { __frozen = 0; if (global.flag[51 + myself] == 6) __frozen = 1; if (__frozen == 1) { _rtext = instance_create(global.monsterx[myself], global.monstery[myself] - 40, obj_recruitanim); _rtext.image_index = 12; if (recruitable == 1) global.flag[global.monstertype[myself] + 600] = -1; global.flag[63 violenced_last] = 1; } if (recruitable == 1 && global.flag[61 disable_recruiting] == 0 && __frozen == 0) { global.flag[63 violenced_last] = 1; if (global.flag[global.monstertype[myself] + 600] != -1) { global.flag[global.monstertype[myself] + 600] = -1; if (global.chapter == 4 && i_ex(obj_titan_spawn_enemy)) { } else { _rtext = instance_create(global.monsterx[myself], global.monstery[myself] - 40, obj_recruitanim); _rtext.image_index = 7; } } } } else { fatal = 0; } if (!__frozen || i_ex(obj_titan_spawn_enemy)) { if (fatal == 1 || i_ex(obj_titan_spawn_enemy)) { defeatanim = instance_create(x, y, obj_deathanim); global.flag[1598]++; } else { defeatanim = instance_create(x, y, obj_defeatanim); } } else if (__frozen) { defeatanim = instance_create(x, y, obj_frozennpc); defeatanim.depth = depth; defeatanim.inbattle = 1; } defeatanim.sprite_index = sprite_index; defeatanim.sprite_index = hurtsprite; defeatanim.image_index = 0; defeatanim.image_xscale = image_xscale; defeatanim.image_yscale = image_yscale; instance_destroy(); }
()
2
{
3
    var __frozen;
4
    if (object_is_ancestor(object_index, obj_monsterparent))
5
    {
6
        __frozen = 0;
7
        if (global.flag[51 + myself] == 6)
8
            __frozen = 1;
9
        if (__frozen == 1)
10
        {
11
            _rtext = instance_create(global.monsterx[myself], global.monstery[myself] - 40, obj_recruitanim);
12
            _rtext.image_index = 12;
13
            if (recruitable == 1)
14
                global.flag[global.monstertype[myself] + 600] = -1;
15
            global.flag[63 violenced_last] = 1;
16
        }
17
        if (recruitable == 1 && global.flag[61 disable_recruiting] == 0 && __frozen == 0)
18
        {
19
            global.flag[63 violenced_last] = 1;
20
            if (global.flag[global.monstertype[myself] + 600] != -1)
21
            {
22
                global.flag[global.monstertype[myself] + 600] = -1;
23
                if (global.chapter == 4 && i_ex(obj_titan_spawn_enemy))
24
                {
25
                }
26
                else
27
                {
28
                    _rtext = instance_create(global.monsterx[myself], global.monstery[myself] - 40, obj_recruitanim);
29
                    _rtext.image_index = 7;
30
                }
31
            }
32
        }
33
    }
34
    else
35
    {
36
        fatal = 0;
37
    }
38
    if (!__frozen || i_ex(obj_titan_spawn_enemy))
39
    {
40
        if (fatal == 1 || i_ex(obj_titan_spawn_enemy))
41
        {
42
            defeatanim = instance_create(x, y, obj_deathanim);
43
            global.flag[1598]++;
44
        }
45
        else
46
        {
47
            defeatanim = instance_create(x, y, obj_defeatanim);
48
        }
49
    }
50
    else if (__frozen)
51
    {
52
        defeatanim = instance_create(x, y, obj_frozennpc);
53
        defeatanim.depth = depth;
54
        defeatanim.inbattle = 1;
55
    }
56
    defeatanim.sprite_index = sprite_index;
57
    defeatanim.sprite_index = hurtsprite;
58
    defeatanim.image_index = 0;
59
    defeatanim.image_xscale = image_xscale;
60
    defeatanim.image_yscale = image_yscale;
61
    instance_destroy();
62
}