Deltarune (Chapter 1) script viewer

← back to main script listing

gml_Object_obj_endbattle_Create_0

(view raw script w/o annotations or w/e)
1
alarm[0] = 15;
gml_Object_obj_endbattle_Alarm_0.gml

with (obj_mainchara) { if (global.specialbattle != 3) cutscene = 0; visible = 1; } with (obj_caterpillarchara) visible = 1; if (global.specialbattle == 0 || global.specialbattle == 3) { for (i = 0; i < (count + 1); i += 1) { with (c[i]) instance_destroy(); } } if (global.specialbattle == 0 || global.specialbattle == 2) global.interact = 0; if (global.flag[9 battle_music] == 1) { snd_free(global.batmusic[0]); snd_volume(global.currentsong[1], 0, 0); snd_resume(global.currentsong[1]); snd_volume(global.currentsong[1], 1, 20); } instance_destroy();
2
con = 0;
3
with (obj_battleback)
4
    destroy = 1;
5
count = 0;
6
global.tension = 0;
7
if (global.specialbattle == 0 || global.specialbattle == 3)
8
{
9
    c[0] = scr_dark_marker
scr_dark_marker

function scr_dark_marker(arg0, arg1, arg2) { thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { sprite_index = arg2; image_speed = 0; image_xscale = 2; image_yscale = 2; } return thismarker; }
(global.heromakex[0], global.heromakey[0], spr_krisr_dark);
10
    if (instance_exists(global.cinstance[0]))
11
    {
12
        count += 1;
13
        c[1] = scr_dark_marker
scr_dark_marker

function scr_dark_marker(arg0, arg1, arg2) { thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { sprite_index = arg2; image_speed = 0; image_xscale = 2; image_yscale = 2; } return thismarker; }
(global.heromakex[1], global.heromakey[1], global.cinstance[0].rsprite);
14
    }
15
    if (instance_exists(global.cinstance[1]))
16
    {
17
        count += 1;
18
        c[2] = scr_dark_marker
scr_dark_marker

function scr_dark_marker(arg0, arg1, arg2) { thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { sprite_index = arg2; image_speed = 0; image_xscale = 2; image_yscale = 2; } return thismarker; }
(global.heromakex[2], global.heromakey[2], global.cinstance[1].rsprite);
19
    }
20
    for (i = 0; i < (count + 1); i += 1)
21
    {
22
        if (i == 0)
23
        {
24
            c[i].direction = point_direction(c[i].x, c[i].y, obj_mainchara.x, obj_mainchara.y);
25
            c[i].speed = point_distance(c[i].x, c[i].y, obj_mainchara.x, obj_mainchara.y) / 10;
26
            c[i].depth = 200 - (i * 20);
27
        }
28
        if (i == 1 || i == 2)
29
        {
30
            c[i].direction = point_direction(c[i].x, c[i].y, global.cinstance[i - 1].x, global.cinstance[i - 1].y);
31
            c[i].speed = point_distance(c[i].x, c[i].y, global.cinstance[i - 1].x, global.cinstance[i - 1].y) / 10;
32
            c[i].depth = 200 - (i * 20);
33
        }
34
    }
35
    alarm[0] = 10;
gml_Object_obj_endbattle_Alarm_0.gml

with (obj_mainchara) { if (global.specialbattle != 3) cutscene = 0; visible = 1; } with (obj_caterpillarchara) visible = 1; if (global.specialbattle == 0 || global.specialbattle == 3) { for (i = 0; i < (count + 1); i += 1) { with (c[i]) instance_destroy(); } } if (global.specialbattle == 0 || global.specialbattle == 2) global.interact = 0; if (global.flag[9 battle_music] == 1) { snd_free(global.batmusic[0]); snd_volume(global.currentsong[1], 0, 0); snd_resume(global.currentsong[1]); snd_volume(global.currentsong[1], 1, 20); } instance_destroy();
36
}
37
if (global.flag[9 battle_music] == 1)
38
    snd_volume(global.batmusic[1], 0, alarm[0]);
gml_Object_obj_endbattle_Alarm_0.gml

with (obj_mainchara) { if (global.specialbattle != 3) cutscene = 0; visible = 1; } with (obj_caterpillarchara) visible = 1; if (global.specialbattle == 0 || global.specialbattle == 3) { for (i = 0; i < (count + 1); i += 1) { with (c[i]) instance_destroy(); } } if (global.specialbattle == 0 || global.specialbattle == 2) global.interact = 0; if (global.flag[9 battle_music] == 1) { snd_free(global.batmusic[0]); snd_volume(global.currentsong[1], 0, 0); snd_resume(global.currentsong[1]); snd_volume(global.currentsong[1], 1, 20); } instance_destroy();