Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_attackpress_Other_11

(view raw script w/o annotations or w/e)
1
if (
scr_monsterpop
scr_monsterpop

function
scr_monsterpop()
{ return global.monster[0] + global.monster[1] + global.monster[2]; }
() > 0)
2
{
3
    if (global.chapter == 4 && i_ex(obj_jackenstein_enemy))
4
    {
5
        points[0] = 0;
6
        points[1] = 0;
7
        points[2] = 0;
8
        
scr_tensionheal
scr_tensionheal

function
scr_tensionheal(arg0)
{ if (i_ex(obj_jackenstein_enemy) && global.tempflag[89] >= 3) global.tension += ceil(arg0 * 1.5); else global.tension += arg0; if (global.tension > global.maxtension) global.tension = global.maxtension; }
(5);
9
    }
10
    if (global.chapter == 4 && i_ex(obj_hammer_of_justice_enemy))
11
    {
12
        points[0] = 0;
13
        with (obj_hammer_of_justice_enemy)
14
        {
15
            state = 13;
16
            sprite_index = spr_gerson_teleport;
17
            image_xscale = 3;
18
            image_yscale = 3;
19
            image_speed = 1;
20
            x += 40;
21
            y += 30;
22
            snd_play_pitch(motor_swing_down, 1.4);
23
        }
24
    }
25
    if (global.chapter == 4 && i_ex(obj_sound_of_justice_enemy))
26
    {
27
        points[0] = 0;
28
        points[1] = 0;
29
        with (obj_sound_of_justice_enemy)
30
        {
31
            if (state != 13)
32
            {
33
                state = 13;
34
                sprite_index = spr_gerson_teleport;
35
                image_xscale = 3;
36
                image_yscale = 3;
37
                image_speed = 1;
38
                x = obj_sound_of_justice_enemy.xstart + 56;
39
                y = obj_sound_of_justice_enemy.ystart + 70;
40
                snd_play_pitch(motor_swing_down, 1.4);
41
            }
42
        }
43
    }
44
    for (i = 0; i < 3; i += 1)
45
    {
46
        if (target == i)
47
        {
48
            if (i_ex(global.charinstance[i]))
49
            {
50
                global.charinstance[i].points = points[i];
51
                with (global.charinstance[i])
52
                {
53
                    state = 1;
54
                    attacktimer = 0;
55
                }
56
            }
57
        }
58
    }
59
}