Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_susiezilla_shadowguy_Step_2

(view raw script w/o annotations or w/e)
1
if (state == UnknownEnum.Value_3)
2
{
3
    var _inAir = height > 0;
4
    height = obj_susiezilla.height;
5
    y = obj_susiezilla.y - 2;
6
    var _susiedir = sign(obj_susiezilla.image_xscale);
7
    x = obj_susiezilla.x + (24 * _susiedir);
8
    depth = obj_susiezilla.depth + 2;
9
    image_xscale = -obj_susiezilla.image_xscale;
10
    if (obj_susiezilla.suplexCon == 2)
11
        sprite_index = spr_susiezilla_shadowguy_grab_rise;
12
    else if (obj_susiezilla.suplexCon == 3)
13
        sprite_index = spr_susiezilla_shadowguy_grab_fall;
14
    if (_inAir && height <= 0)
15
    {
16
        
scr_bounce_land
scr_bounce_land

function
scr_bounce_land(arg0)
{ bounce_land = instance_create(x, y, obj_bounce_land); bounce_land.target = id; bounce_land.strength = arg0; }
(2);
17
        hp = 0;
18
        var _explosion = instance_create(x, y, obj_susiezilla_explosion);
19
        _explosion.reflected = true;
20
        _explosion.silent = true;
21
        snd_play_pitch(snd_explosion_firework, 0.6);
22
        with (_explosion)
23
        {
24
            scr_depth_pivot();
25
            depth -= 10;
26
        }
27
        for (i = 0; i < 6; i++)
28
        {
29
            var _xx = lengthdir_x(50, i * 60);
30
            var _yy = lengthdir_y(50, i * 60);
31
            _yy /= 2;
32
            _explosion = instance_create(x + _xx, y + _yy, obj_susiezilla_explosion);
33
            _explosion.reflected = true;
34
            _explosion.silent = true;
35
            with (_explosion)
36
            {
37
                scr_depth_pivot();
38
                depth -= 10;
39
            }
40
        }
41
        state = UnknownEnum.Value_7;
42
        fall_speed = -9;
43
    }
44
}
45
event_inherited();
46
if (height > 0 || fall_speed != 0)
47
{
48
    shadow.visible = true;
49
    shadow.x = x;
50
    shadow.y = y;
51
    shadow.depth = depth + 1000;
52
}
53
else
54
{
55
    shadow.visible = false;
56
}
57
58
enum UnknownEnum
59
{
60
    Value_3 = 3,
61
    Value_7 = 7
62
}