Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_board_puzzlebombbullet_Step_0

(view raw script w/o annotations or w/e)
1
if (i_ex(obj_board_camera))
2
{
3
    if (obj_board_camera.con != 0)
4
        instance_destroy();
5
}
6
timer++;
7
if (timer == 30)
8
    instance_destroy();
9
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();
}
();
10
for (i = 5; i > 0; i -= 1)
11
{
12
    remx[i] = remx[i - 1];
13
    remy[i] = remy[i - 1];
14
}
15
remx[0] = x;
16
remy[0] = y;
17
var ignoresolid = false;
18
if (place_meeting(x, y, obj_board_breakableblock))
19
{
20
    with (instance_place(x, y, obj_board_breakableblock))
21
    {
22
        instance_create(x, y, obj_board_breakpoof);
23
        snd_play(snd_board_splash);
24
        instance_destroy();
25
        ignoresolid = true;
26
    }
27
}
28
if (place_meeting(x, y, obj_mainchara_board))
29
{
30
    with (instance_place(x, y, obj_mainchara_board))
31
    {
32
        if (name != "susie")
33
        {
34
            if (iframes <= 0 && myhealth > 0)
35
            {
36
                iframes = 20;
37
                snd_play(snd_board_playerhurt);
38
                myhealth -= other.damage;
39
            }
40
        }
41
    }
42
}
43
if (place_meeting(x, y, obj_board_penaltyshot))
44
{
45
    with (instance_place(x, y, obj_board_penaltyshot))
46
        hit = 1;
47
}
48
if (place_meeting(x, y, obj_board_watertile))
49
    ignoresolid = true;
50
var destroy = false;
51
if (ignoresolid == false)
52
{
53
    if (place_meeting(x, y, obj_board_solid))
54
        destroy = true;
55
}
56
if (x < 128 || x > 480 || y < 48 || y > 288)
57
    destroy = true;
58
if (destroy == true)
59
{
60
    
scr_board_afterimage
scr_board_afterimage

function
scr_board_afterimage()
{ var afterimage = instance_create(x, y, obj_board_afterimage); afterimage.depth = depth; afterimage.sprite_index = sprite_index; afterimage.image_index = image_index; afterimage.image_speed = image_speed; afterimage.image_xscale = image_xscale; afterimage.image_yscale = image_yscale; afterimage.image_angle = image_angle; if (argument_count >= 1) afterimage.type = argument0; if (argument_count >= 2) afterimage.length = argument1; if (argument_count >= 3) afterimage.flickerrate = argument2; return afterimage; }
(0, 3);
61
    instance_destroy();
62
}