Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_board_fern_Step_0

(view raw script w/o annotations or w/e)
1
depth = 999989;
2
if (room == room_board_1 || room == room_board_2)
3
{
4
    if (active)
5
        
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();
}
();
6
    exit;
7
}
8
if (room != room_dw_b3bs_mysterypuzzle && room != room_dw_b3bs_extrapuzzle)
9
{
10
    if (kris == 0)
11
    {
12
        with (obj_mainchara_board)
13
        {
14
            if (name == "kris")
15
                other.kris = id;
16
        }
17
    }
18
    if (i_ex(kris))
19
    {
20
        if (kris.sword == true)
21
        {
22
            sndbuff--;
23
            if (place_meeting(x, y, obj_board_swordhitbox))
24
            {
25
                var sword = instance_place(x, y, obj_board_swordhitbox);
26
                if (sword.swordlv > defense)
27
                {
28
                    myhealth--;
29
                    if (myhealth <= 0)
30
                    {
31
                        instance_create(centerx(), centery(), obj_board_enemydefeatsplash);
32
                        instance_destroy();
33
                    }
34
                }
35
                else if (sndbuff <= 0)
36
                {
37
                    snd_stop(snd_board_sword_metal);
38
                    snd_play(snd_board_sword_metal);
39
                    sndbuff = 10;
40
                }
41
            }
42
            if (place_meeting(x, y, obj_board_enemy_deer_ice_spell))
43
            {
44
                snd_stop(snd_board_splash);
45
                snd_play(snd_board_splash);
46
                block = instance_create(x, y, obj_pushableblock_board);
47
                block.sprite_index = spr_board_pushableblock_ice;
48
                block.custom_sprite = spr_board_pushableblock_ice;
49
                block.image_xscale = 1;
50
                block.image_yscale = 1;
51
                var x_cell = floor(block.x / global.cell_size);
52
                var y_cell = floor((block.y + 18) / global.cell_size);
53
                var position_x = (x_cell * global.cell_size) + (global.cell_size / 2);
54
                var position_y = (y_cell * global.cell_size) + (global.cell_size / 2);
55
                block.x = position_x - 16;
56
                block.y = position_y - 16;
57
                for (var i = 0; i < 4; i++)
58
                {
59
                    fx = 
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; }
(block.x + 16, block.y + 16, spr_board_snowflake, 0.3, depth, 2);
60
                    fx.direction = (360 / count) * i;
61
                    
scr_doom
scr_doom

function
scr_doom(arg0, arg1)
{ with (instance_create_depth(0, 0, 0, obj_doom)) { alarm[0] target = arg0; } }
(fx, 12);
62
                }
63
                instance_destroy();
64
            }
65
        }
66
    }
67
    
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();
}
();
68
    image_speed = remspeed;
69
    if (i_ex(obj_board_camera))
70
    {
71
        if (obj_board_camera.con != 0)
72
            image_speed = 0;
73
    }
74
    if (global.interact == 1)
75
        image_speed = 0;
76
}