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