Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_darkshape_bigblast_Step_0

(view raw script w/o annotations or w/e)
1
if (x < (__view_get(e__VW.XView, 0) - 80))
2
    instance_destroy();
3
if (x > (__view_get(e__VW.XView, 0) + 760))
4
    instance_destroy();
5
if (y < (__view_get(e__VW.YView, 0) - 80))
6
    instance_destroy();
7
if (y > (__view_get(e__VW.YView, 0) + 580))
8
    instance_destroy();
9
init_size *= 0.65;
10
timer++;
11
prev_counter = color_counter;
12
color_counter = 0.9 + (sin(timer) * 0.1);
13
if (leavetrails)
14
{
15
    if (!irandom(1))
16
    {
17
        with (instance_create_depth(x, y + irandom_range(-32, 32), depth - 1, obj_battle_marker))
18
        {
19
            var scale = choose(0.5, 0.75);
20
            image_xscale = scale * choose(1, -1) * 0.75;
21
            image_yscale = scale * 1.5;
22
            destroyoncomplete = true;
23
            sprite_index = spr_darkshape_dissipate;
24
            image_speed = 0.5 + choose(0, 0.5);
25
            direction = other.direction + 180;
26
            image_angle = direction - 90;
27
            speed = 3 + random(3);
28
        }
29
    }
30
}
31
image_xscale = (0.65 + init_size + (sin(global.time * 2) * 0.1)) * xmod;
32
image_yscale = (0.65 + init_size + (sin(global.time * 2) * 0.1)) * ymod;
33
with (obj_darkshape)
34
{
35
    if (point_distance(x, y, other.x, other.y) < ((40 * other.image_xscale) + (radius * image_xscale)))
36
    {
37
        var dblast = other.id;
38
        with (instance_create_depth(x, y, depth - 1, obj_battle_marker))
39
        {
40
            image_xscale = choose(-0.75, 0.75);
41
            image_yscale = 0.75;
42
            destroyoncomplete = true;
43
            sprite_index = spr_darkshape_dissipate;
44
            image_speed = 0.5 + choose(0, 0.5);
45
            direction = point_direction(dblast.x, dblast.y, x, y);
46
            image_angle = direction - 90;
47
            speed = 3;
48
        }
49
        instance_destroy();
50
    }
51
}
52
53
enum e__VW
54
{
55
    XView,
56
    YView,
57
    WView,
58
    HView,
59
    Angle,
60
    HBorder,
61
    VBorder,
62
    HSpeed,
63
    VSpeed,
64
    Object,
65
    Visible,
66
    XPort,
67
    YPort,
68
    WPort,
69
    HPort,
70
    Camera,
71
    SurfaceID
72
}