Deltarune (Chapter 1) script viewer

← back to main script listing

gml_Object_obj_wobblything_evil_Step_0

(view raw script w/o annotations or w/e)
1
if (wobbled == 0)
2
{
3
    if (instance_exists(obj_mainchara) && global.interact == 0)
4
    {
5
        if (obj_mainchara.x > (x - 20) && obj_mainchara.x < (x + 50))
6
        {
7
            if (!instance_exists(obj_battlealphaer))
8
            {
9
                d = instance_create(0, 0, obj_battlealphaer);
10
                d.depth = 800000;
11
            }
12
            with (obj_mainchara)
13
            {
14
                battlemode = 1;
15
                threebuffer = 2;
16
            }
17
            s = snd_play(snd_wobbler);
18
            snd_pitch(s, 0.5 + random(0.2));
19
            s2 = snd_play(snd_wobbler);
20
            snd_pitch(s2, 0.9 + random(0.2));
21
            image_speed = 0.2;
22
            wobbled = 1;
23
            for (i = 0; i < 3; i += 1)
24
            {
25
                dbullet = instance_create(x, y, obj_overworld_spade);
26
                with (dbullet)
27
                {
28
                    damage = 15;
29
                    sprite_index = spr_wobblebullet;
30
                    image_alpha = 0.7;
31
                    image_xscale = 2;
32
                    image_yscale = 2;
33
                }
34
                dbullet.speed = 10;
35
                dbullet.direction = 250 + (i * 20);
36
            }
37
        }
38
    }
39
}