Deltarune script viewer

← back to main script listing

gml_Object_obj_berdlyb_tornado_old_Step_0

(view raw script w/o annotations or w/e)
1
if (!init)
2
{
3
    init = true;
4
    start_angle = ((direction + 180) % 360) + 15;
5
    if (middespawn)
6
    {
7
        psuedo_speed = speed;
8
        speed = 0;
9
        active = false;
10
        start_depth = depth;
11
        depth = obj_growtangle.depth + 1;
12
        fader = -3;
13
        x = obj_growtangle.x;
14
        y = obj_growtangle.y;
15
    }
16
}
17
if (middespawn)
18
{
19
    if (traveldistance >= maxdistance)
20
        instance_destroy();
21
}
22
if (spindir != 0)
23
{
24
    if (depth != start_depth && traveldistance >= (maxdistance / 2))
25
    {
26
        depth = start_depth;
27
        active = true;
28
    }
29
    var _progress = traveldistance / maxdistance;
30
    var _dist = sin(_progress * pi) * 150;
31
    var __theta = start_angle + (_progress * spindir * 45);
32
    x = obj_growtangle.x + lengthdir_x(_dist, __theta);
33
    y = obj_growtangle.y + lengthdir_y(_dist, __theta);
34
    direction = point_direction(x, y, obj_growtangle.x, obj_growtangle.y);
35
}
36
else if (wall_destroy == 1)
37
{
38
    if (x < (__view_get(e__VW.XView, 0) - 80))
39
        instance_destroy();
40
    if (x > (__view_get(e__VW.XView, 0) + 760))
41
        instance_destroy();
42
    if (y < (__view_get(e__VW.YView, 0) - 80))
43
        instance_destroy();
44
    if (y > (__view_get(e__VW.YView, 0) + 580))
45
        instance_destroy();
46
}
47
if (updateimageangle == 1)
48
    image_angle = direction;
49
50
enum e__VW
51
{
52
    XView,
53
    YView,
54
    WView,
55
    HView,
56
    Angle,
57
    HBorder,
58
    VBorder,
59
    HSpeed,
60
    VSpeed,
61
    Object,
62
    Visible,
63
    XPort,
64
    YPort,
65
    WPort,
66
    HPort,
67
    Camera,
68
    SurfaceID
69
}