Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_susiezilla_mansion_Step_0

(view raw script w/o annotations or w/e)
1
hittimer--;
2
if (missileCon >= 0)
3
{
4
    if (timer >= 5)
5
    {
6
        var missile = instance_create((x - 60) + ((missileCon % 5) * 30), y - 2, obj_susiezilla_missile);
7
        missile.height = 40;
8
        var _flip = (missileCon % 2) == 1;
9
        if (pattern == 2 || pattern == 5)
10
        {
11
            missile.target_y = target_y + random_range(-10, 10);
12
            missile.target_x = (camerax() + 320 + (dir * 260)) - (missileCon * 60 * dir);
13
        }
14
        else if (missileCon == tracker || pattern == 1)
15
        {
16
            missile.tracker = 1;
17
        }
18
        if (missileCon == missilecap)
19
            missileCon = -1;
20
        else
21
            missileCon++;
22
        if (pattern == 2 || pattern == 5)
23
            timer = 2;
24
        else
25
            timer = 0;
26
    }
27
    timer++;
28
}
29
if (pattern == 1)
30
{
31
    patterntimer++;
32
    if (patterncount < patterncountmax && (patterntimer % 4) == 0)
33
    {
34
        patterncount++;
35
        event_user(0);
36
    }
37
    if (patterntimer == 180)
38
    {
39
        patterncount = 0;
40
        patterncountmax += 2;
41
        patterntimer = 0;
42
        pattern = 5;
43
    }
44
}
45
if (pattern == 5)
46
{
47
    patterntimer++;
48
    if (patterntimer == 1)
49
        event_user(0);
50
    if (patterntimer == 61)
51
        event_user(0);
52
    if (patterntimer == 220)
53
    {
54
        patterntimer = 0;
55
        pattern = 1;
56
    }
57
}
58
if (
scr_debug
scr_debug

function
scr_debug()
{ if (global.debug == 1) return 1; }
())
59
{
60
    if (keyboard_check_pressed(ord("N")))
61
    {
62
        pattern++;
63
        if (pattern == 6)
64
            pattern = 0;
65
        var _pname = "pattern";
66
        switch (pattern)
67
        {
68
            case 0:
69
                _pname = "random";
70
                break;
71
            case 1:
72
                _pname = "tracking";
73
                break;
74
            case 2:
75
                _pname = "linear";
76
                break;
77
            case 3:
78
                _pname = "reset salvo";
79
                break;
80
            case 4:
81
                _pname = "tracker salvo";
82
                break;
83
            case 5:
84
                _pname = "linear tracker";
85
                break;
86
        }
87
        
scr_debug_print
scr_debug_print

function
scr_debug_print(arg0)
{ } function print_message(arg0) { } function debug_print(arg0) { } function scr_debug_clear_all() { }
("missile pattern set to type " + string(pattern) + " (" + _pname + ")");
88
    }
89
}