Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_rabbick_bush_Step_0

(view raw script w/o annotations or w/e)
1
if (instance_exists(obj_mainchara))
2
{
3
    mx = obj_mainchara.x + (obj_mainchara.sprite_width / 2);
4
    ox = x + (sprite_width / 2);
5
    if (abs(mx - ox) <= radius && obj_mainchara.y >= y && con == 0)
6
    {
7
        snd_play(snd_wing);
8
        lo = snd_play(snd_wing);
9
        snd_pitch(lo, 0.8);
10
        con = 1;
11
        visible = 1;
12
        rabbick = instance_create(x, y, obj_chaseenemy);
13
        rabbick.vspeed = 16;
14
        with (rabbick)
15
        {
16
            depth = other.depth - 1;
17
            sprite_index = spr_rabbick_enemy_overworld;
18
            myencounter = 16;
19
            touchsprite = spr_rabbick_enemy_overworld;
20
            alertcon = -1;
21
            pacetype = 10;
22
        }
23
    }
24
}