Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_mike_lancer_Collision_obj_juggle_collision

(view raw script w/o annotations or w/e)
1
if (act == 0)
2
{
3
    var _width = 32 + (obj_mike_controller.line_width / 2);
4
    var _targetx = (x < (room_width / 2)) ? ((room_width / 2) + _width) : ((room_width / 2) - _width);
5
    var _direction = point_direction(x, obj_mike_controller.y, _targetx, y - 200);
6
    var _vs = 7 + hits;
7
    motion_set(_direction, _vs);
8
    gravity = 0;
9
alarm[0]
10
    act = 1;
11
    wobble = 15;
12
    hits++;
13
    if (hits < max_hits)
14
        snd_play(snd_lancer_cough);
15
    else
16
        snd_play(snd_lancerlaugh);
17
    var _a = instance_create(x, y, obj_healanim);
18
    _a.target = id;
19
    _a.particlecolor = c_white;
20
    with (_a)
21
    {
22
        t = 1;
23
        sw = sprite_width;
24
        sh = sprite_height;
25
    }
26
    with (obj_mike_minigame_controller)
27
        myscore += 50;
28
}