Deltarune (Chapter 1) script viewer

← back to main script listing

gml_Object_obj_darkponman_ow_Step_0

(view raw script w/o annotations or w/e)
1
rot += rotspeed;
2
xx = lengthdir_x(eyer, rot) + offx;
3
yy = lengthdir_y(eyer, rot) + offy;
4
if (boss == 1)
5
{
6
    if (instance_exists(obj_mainchara))
7
    {
8
        obj_mainchara.battlemode = 0;
9
        with (obj_darkponman_ow)
10
        {
11
            if (obj_mainchara.x > (x - xrange) && obj_mainchara.x < (x + xrange) && obj_mainchara.y > (y - yrange) && obj_mainchara.y < (y + yrange))
12
                obj_mainchara.battlemode = 1;
13
        }
14
    }
15
}
16
if (con == 0)
17
{
18
    if (made == 0)
19
    {
20
        for (i = 0; i < bmax; i += 1)
21
        {
22
            xa = lengthdir_x(eyer * (2 + (i * 2)), rot - (i * 2)) + offx;
23
            ya = lengthdir_y(eyer * (2 + (i * 2)), rot - (i * 2)) + offy;
24
            fb[i] = instance_create(x + xa, y + ya, obj_overworldbulletparent);
25
            fb[i].sprite_index = spr_diamondbullet;
26
            fb[i].active = 1;
27
            fb[i].target = 3;
28
            fb[i].damage = 16;
29
            fb[i].image_angle = rot - i;
30
            fb[i].depth = 200;
31
            fb[i].alarm[0] = -10;
32
            fb[i].image_alpha = 0;
33
            fb[i].image_xscale = 0.7;
34
        }
35
        made = 1;
36
    }
37
    if (eyer <= 10)
38
    {
39
        eyer += 1;
40
    }
41
    else
42
    {
43
        con = 1;
44
        image_speed = 0.1;
45
    }
46
}
47
if (made == 1)
48
{
49
    if (rotspeed > 0)
50
        siner += 1;
51
    if (rotspeed < 0)
52
        siner -= 1;
53
    for (i = 0; i < bmax; i += 1)
54
    {
55
        if (instance_exists(fb[i]))
56
        {
57
            xa = lengthdir_x(eyer * (2 + (i * 2)), rot - (sin(siner / 10) * (i * 2))) + offx;
58
            ya = lengthdir_y(eyer * (2 + (i * 2)), rot - (sin(siner / 10) * (i * 2))) + offy;
59
            fb[i].x = x + xa;
60
            fb[i].y = y + ya;
61
            fb[i].image_alpha = 0.8 + (sin(((i * 4) + siner) / 5) * 0.2);
62
            if (con < 1)
63
                fb[i].image_alpha = 0 + (eyer / 10);
64
            fb[i].image_angle = rot - (sin(siner / 10) * (i * 4));
65
        }
66
    }
67
}