Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_overworld_darkness_bulletarea_Step_0

(view raw script w/o annotations or w/e)
1
if (instance_exists(obj_mainchara) && ignorebuffer < 0)
2
{
3
    obj_mainchara.battlemode = 0;
4
    cancel = 0;
5
    if (onlyActiveIfBulletsExist && !instance_exists(obj_overworldbulletparent))
6
        cancel = 1;
7
    if (onlyActiveIfSpecialObjectExists && !i_ex(specialObject))
8
        cancel = 1;
9
    if (!active)
10
        cancel = 1;
11
    if (cancel == 0)
12
    {
13
        if (obj_mainchara.bbox_right >= x && obj_mainchara.bbox_left <= (x + sprite_width) && obj_mainchara.bbox_bottom >= y && obj_mainchara.bbox_top <= (y + sprite_height))
14
        {
15
            obj_overworld_bulletarea.checkid = id;
16
            with (obj_overworld_bulletarea)
17
            {
18
                if (id != checkid)
19
                    ignorebuffer = 2;
20
            }
21
            obj_mainchara.battlemode = 1;
22
            if (keepHidden == 0)
23
            {
24
                with (obj_overworld_bulletarea)
25
                {
26
                    if (
scr_debug
scr_debug

function
scr_debug()
{ if (global.debug == 1) return 1; }
())
27
                        showArea = 1;
28
                }
29
            }
30
        }
31
    }
32
}
33
ignorebuffer--;
34
if (obj_mainchara.battlemode == 0)
35
    timer++;
36
else
37
    timer = 0;
38
if (timer >= 60)
39
{
40
    with (obj_darkcontroller)
41
        charcon = 0;
42
}
43
image_alpha = 0;