Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_holemouse_Collision_obj_holemouse_generator

(view raw script w/o annotations or w/e)
1
if (room == room_dw_city_mice3 && direction != 270 && bounceOffDoor == 1 && con == 1)
2
{
3
    y += 40;
4
    direction += 90;
5
    turndir = "left";
6
    if (direction >= 360)
7
        direction -= 360;
8
    if (direction < 0)
9
        direction += 360;
10
    breakcount++;
11
    if (direction == (remdir - 180) || direction == (remdir + 180))
12
        direction += 90;
13
    if (breakcount == 4)
14
    {
15
        direction = remdir + 180;
16
        if (direction > 360)
17
            direction -= 360;
18
        mx = lengthdir_x(40, direction);
19
        my = lengthdir_y(40, direction);
20
    }
21
    turnfx = scr_afterimage
scr_afterimage

function scr_afterimage() { afterimage = instance_create(x, y, obj_afterimage); afterimage.sprite_index = sprite_index; afterimage.image_index = image_index; afterimage.image_blend = image_blend; afterimage.image_speed = 0; afterimage.depth = depth; afterimage.image_xscale = image_xscale; afterimage.image_yscale = image_yscale; afterimage.image_angle = image_angle; return afterimage; }
();
22
    turnfx.image_angle = direction;
23
    turnfx.sprite_index = spr_holemouse_turnrightfx;
24
    turnfx.image_index = 0;
25
    turnfx.x += 20;
26
    turnfx.y += 20;
27
    if (turndir == "right")
28
        turnfx.image_index = 1;
29
}
30
else if (direction != 270 && bounceOffDoor == 1 && con == 1)
31
{
32
    if (con == 1)
33
        con = 5;
34
}