Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_board_pippins_grabbable_Step_0

(view raw script w/o annotations or w/e)
1
scr_depth_board
scr_depth_board

function
scr_depth_board()
{ depth = 1000000 - ((y * 10) + ((sprite_height - sprite_yoffset) * 10)); } function scr_board_depth() {
scr_depth_board();
}
();
2
if (active)
3
{
4
    
scr_depth_board
scr_depth_board

function
scr_depth_board()
{ depth = 1000000 - ((y * 10) + ((sprite_height - sprite_yoffset) * 10)); } function scr_board_depth() {
scr_depth_board();
}
();
5
    if (grabbed == 0)
6
    {
7
        with (obj_board_grabobject)
8
        {
9
            if (grabbedid == other.id)
10
            {
11
                other.grabbed = 1;
12
                sprite_index = spr_board_npc_pippins_sideways;
13
                other.sprite_index = spr_board_npc_pippins_sideways;
14
            }
15
        }
16
    }
17
    pose--;
18
    if (pose > 1)
19
    {
20
        if (room != room_dw_b3bs_cheaterpippins)
21
            sprite_index = spr_board_pippins_pose;
22
    }
23
    else
24
    {
25
        sprite_index = spr_board_npc_pippins;
26
        if (grabbed)
27
            sprite_index = spr_board_npc_pippins_sideways;
28
    }
29
}
30
else
31
{
32
    pose = 0;
33
}
34
if (killme)
35
{
36
    if (!instance_exists(obj_board_grabobject))
37
    {
38
        killme = false;
39
        killed = true;
40
        corpse = 
scr_board_marker
scr_board_marker

function
scr_board_marker()
{ var _thismarker = instance_create(argument0, argument1, obj_board_marker); _thismarker.sprite_index = argument2; _thismarker.image_xscale = 2; _thismarker.image_yscale = 2; if (argument_count >= 4) _thismarker.image_speed = argument3; if (argument_count >= 5) { if (argument4 != -1) _thismarker.depth = argument4; } if (argument_count >= 6) _thismarker.image_xscale = argument5; if (argument_count >= 6) _thismarker.image_yscale = argument5; if (argument_count >= 7) _thismarker.animateonce = argument6; return _thismarker; }
(x, y, sprite_index, 0, depth, 2);
41
        x = room_width * 999;
42
        y = room_height * 999;
43
    }
44
}
45
if (killed)
46
{
47
    if (obj_board_camera.con != 0)
48
    {
49
        with (corpse)
50
            
scr_doom
scr_doom

function
scr_doom(arg0, arg1)
{ with (instance_create_depth(0, 0, 0, obj_doom)) { alarm[0] target = arg0; } }
(id, 30);
51
        killed = false;
52
        grabbed = 0;
53
        sprite_index = spr_board_npc_pippins;
54
    }
55
}