Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_susiezilla_singlescreen_shadowguy_in_dozer_Create_0

(view raw script w/o annotations or w/e)
1
event_inherited();
2
scr_darksize
scr_darksize

function
scr_darksize()
{ var inst = id; if (argument_count) inst = argument0; inst.image_xscale = 2; inst.image_yscale = 2; }
();
3
value = 10;
4
states = 
5
{
6
    none: -1,
7
    approach: 0,
8
    ram: 1,
9
    dead: 2
10
};
11
state = states.approach;
12
state_timer = 0;
13
image_speed = 0;
14
if (i_ex(obj_susiezilla_statue))
15
{
16
    if (obj_susiezilla_statue.x < (x - 24))
17
        facing = -1;
18
    else
19
        facing = 1;
20
}
21
block_facing = facing;
22
xanchor = x;
23
y = clamp(y, 200, 380);
24
ystart = y;
25
myxcenter = x;
26
myycenter = y;
27
dozing_speed = 0;
28
damage = 15;
29
knockback = 10;
30
blockable = false;
31
pushalong = 15;
32
flash = 0;
33
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpvar_respect() { if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true; return ___lerpvar; }
("ropeheight", -360, 0, 16, 1, "in");
34
scr_script_delayed
scr_script_delayed

function
scr_script_delayed()
{ var __scriptdelay = instance_create(0, 0, obj_script_delayed); __scriptdelay.script = argument[0]; __scriptdelay.alarm[0] = argument[1]; __scriptdelay.target = id; for (var __i = 0; __i < (argument_count - 2); __i++) __scriptdelay.script_arg[__i] = argument[__i + 2]; __scriptdelay.arg_count = argument_count - 2; return __scriptdelay; }
(scr_var, 16, "blockable", true);
35
alarm[5]
 = 16;
gml_Object_obj_susiezilla_singlescreen_shadowguy_in_dozer_Alarm_5.gml

with (obj_susiezilla_gamecontroller) shake = 5; snd_stop(snd_drive); snd_play_x(snd_heavyswing, 10, 1);
36
snd_play_x(snd_drive, 0.5, 1.2);
37
38
instant_defeat_dozer = function()
39
{
40
    if (state == states.dead)
41
        exit;
42
    if (ropeheight != 0)
43
    {
44
        with (obj_lerpvar)
45
        {
46
            if (target == other.id)
47
                instance_destroy();
48
        }
49
        with (obj_script_delayed)
50
        {
51
            if (target == other.id)
52
                instance_destroy();
53
        }
54
    }
55
    sprite_index = spr_susiezilla_shadowguy_driver;
56
    image_index = 0;
57
    image_speed = 0;
58
    state = states.dead;
59
    state_timer = 0;
60
    blockable = false;
61
    flash = 0;
62
    alarm[5]
 = -1;
gml_Object_obj_susiezilla_singlescreen_shadowguy_in_dozer_Alarm_5.gml

with (obj_susiezilla_gamecontroller) shake = 5; snd_stop(snd_drive); snd_play_x(snd_heavyswing, 10, 1);
63
    
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpvar_respect() { if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true; return ___lerpvar; }
("ropeheight", ropeheight, ropeheight + 16, 8, 1, "out");
64
    
scr_script_delayed
scr_script_delayed

function
scr_script_delayed()
{ var __scriptdelay = instance_create(0, 0, obj_script_delayed); __scriptdelay.script = argument[0]; __scriptdelay.alarm[0] = argument[1]; __scriptdelay.target = id; for (var __i = 0; __i < (argument_count - 2); __i++) __scriptdelay.script_arg[__i] = argument[__i + 2]; __scriptdelay.arg_count = argument_count - 2; return __scriptdelay; }
(scr_lerpvar, 8, "ropeheight", ropeheight + 16, -360, 24, 1, "in");
65
    
scr_script_delayed
scr_script_delayed

function
scr_script_delayed()
{ var __scriptdelay = instance_create(0, 0, obj_script_delayed); __scriptdelay.script = argument[0]; __scriptdelay.alarm[0] = argument[1]; __scriptdelay.target = id; for (var __i = 0; __i < (argument_count - 2); __i++) __scriptdelay.script_arg[__i] = argument[__i + 2]; __scriptdelay.arg_count = argument_count - 2; return __scriptdelay; }
(instance_destroy, 44);
66
    with (instance_create_depth(x - (34 * facing), y - 74, depth, obj_dozer_parts))
67
    {
68
        sprite_index = spr_susiezilla_dozer_pieces;
69
        image_index = 0;
70
        image_xscale *= other.facing;
71
        h_speed = -3 * other.facing;
72
        v_speed = -8;
73
        ground = other.y;
74
    }
75
    with (instance_create_depth(x + (34 * facing), y - 74, depth, obj_dozer_parts))
76
    {
77
        sprite_index = spr_susiezilla_dozer_pieces;
78
        image_index = 2;
79
        image_xscale *= other.facing;
80
        h_speed = 3 * other.facing;
81
        v_speed = -8;
82
        ground = other.y;
83
    }
84
    with (instance_create_depth(x - (34 * facing), y - 16, depth, obj_dozer_parts))
85
    {
86
        sprite_index = spr_susiezilla_dozer_pieces;
87
        image_index = 1;
88
        image_xscale *= other.facing;
89
        h_speed = -4 * other.facing;
90
        v_speed = -5;
91
        ground = other.y;
92
    }
93
    with (instance_create_depth(x + (34 * facing), y - 16, depth, obj_dozer_parts))
94
    {
95
        sprite_index = spr_susiezilla_dozer_pieces;
96
        image_index = 3;
97
        image_xscale *= other.facing;
98
        h_speed = 4 * other.facing;
99
        v_speed = -5;
100
        ground = other.y;
101
    }
102
    with (obj_susiezilla_gamecontroller)
103
        check_enemies();
104
};
105
106
with (obj_susiezilla_gamecontroller)
107
{
108
    if (dozer_count < 2)
109
    {
110
        dozer_count++;
111
        if (dozer_count == 2)
112
        {
113
            var tetalk = stringsetloc(
* More dozers!! Susie!! Don't let them scrap me!!!
"* More dozers!! Susie!! Don't let them scrap me!!!", "obj_susiezilla_singlescreen_shadowguy_in_dozer_slash_Create_0_gml_148_0"
);
114
            
scr_script_delayed
scr_script_delayed

function
scr_script_delayed()
{ var __scriptdelay = instance_create(0, 0, obj_script_delayed); __scriptdelay.script = argument[0]; __scriptdelay.alarm[0] = argument[1]; __scriptdelay.target = id; for (var __i = 0; __i < (argument_count - 2); __i++) __scriptdelay.script_arg[__i] = argument[__i + 2]; __scriptdelay.arg_count = argument_count - 2; return __scriptdelay; }
(scr_tennashouter, 15, tetalk, 150);
115
        }
116
    }
117
}