Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_susiezilla_singlescreen_shadowguy_in_dozer_Collision_obj_susiezilla_player

(view raw script w/o annotations or w/e)
1
with (obj_susiezilla_gamecontroller)
2
{
3
    if (gameover)
4
        exit;
5
}
6
var temp_mask = -4;
7
if (i_ex(obj_susiezilla_player))
8
{
9
    temp_mask = obj_susiezilla_player.mask_index;
10
    obj_susiezilla_player.mask_index = spr_susiezilla_susie_dozer_mask;
11
}
12
var breakthrough = false;
13
if (facing && other.myxcenter < (x + 18))
14
    breakthrough = true;
15
if (!facing && other.myxcenter > (x - 18))
16
    breakthrough = true;
17
if (place_meeting(x, y, other.id))
18
{
19
    if (state != states.dead && ropeheight == 0 && breakthrough)
20
    {
21
        var _hit = other.id;
22
        if (_hit.hitactive)
23
        {
24
            snd_stop(snd_punchmed);
25
            snd_play(snd_punchmed);
26
            snd_play_x(snd_explosion_firework, 10, 1.25);
27
            snd_play_x(snd_metal_hit_reverb, 1, 0.5);
28
            with (_hit)
29
                event_user(0);
30
            sprite_index = spr_susiezilla_shadowguy_driver;
31
            image_index = 0;
32
            image_speed = 0;
33
            state = states.dead;
34
            state_timer = 0;
35
            blockable = false;
36
            flash = 0;
37
            
scr_susiezilla_hiteffect
scr_susiezilla_hiteffect

function
scr_susiezilla_hiteffect(arg0)
{ var _hit = arg0; var _hitmarker =
scr_dark_marker(round((_hit.myxcenter + myxcenter) / 2), round((_hit.myycenter + myycenter) / 2), spr_dogcar_hit);
scr_doom(_hitmarker, 4);
var hitscale = myhitscale; if (_hit.myhitscale > hitscale) hitscale = _hit.myhitscale;
scr_scale(hitscale, _hitmarker);
scr_lerpvar_instance(_hitmarker, "image_xscale", hitscale, 1, 4);
scr_lerpvar_instance(_hitmarker, "image_yscale", hitscale, 1, 4);
_hitmarker.depth = depth - 100; return _hitmarker; }
(_hit);
38
            
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", 0, 16, 8, 1, "out");
39
            
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", 16, -360, 24, 1, "in");
40
            
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);
41
            with (instance_create_depth(x - (34 * facing), y - 74, depth, obj_dozer_parts))
42
            {
43
                sprite_index = spr_susiezilla_dozer_pieces;
44
                image_index = 0;
45
                image_xscale *= other.facing;
46
                h_speed = -3 * other.facing;
47
                v_speed = -8;
48
                ground = other.y;
49
            }
50
            with (instance_create_depth(x + (34 * facing), y - 74, depth, obj_dozer_parts))
51
            {
52
                sprite_index = spr_susiezilla_dozer_pieces;
53
                image_index = 2;
54
                image_xscale *= other.facing;
55
                h_speed = 3 * other.facing;
56
                v_speed = -8;
57
                ground = other.y;
58
            }
59
            with (instance_create_depth(x - (34 * facing), y - 16, depth, obj_dozer_parts))
60
            {
61
                sprite_index = spr_susiezilla_dozer_pieces;
62
                image_index = 1;
63
                image_xscale *= other.facing;
64
                h_speed = -4 * other.facing;
65
                v_speed = -5;
66
                ground = other.y;
67
            }
68
            with (instance_create_depth(x + (34 * facing), y - 16, depth, obj_dozer_parts))
69
            {
70
                sprite_index = spr_susiezilla_dozer_pieces;
71
                image_index = 3;
72
                image_xscale *= other.facing;
73
                h_speed = 4 * other.facing;
74
                v_speed = -5;
75
                ground = other.y;
76
            }
77
            with (obj_susiezilla_gamecontroller)
78
                check_enemies();
79
            with (obj_susiezilla_singlescreen_hud_score)
80
                score_change(other.value);
81
        }
82
    }
83
}
84
myxcenter = x;
85
myycenter = y;
86
if (i_ex(obj_susiezilla_player))
87
    obj_susiezilla_player.mask_index = temp_mask;