Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_homealone_dess_hockey_puck_Create_0

(view raw script w/o annotations or w/e)
1
t = 0;
2
g = 0;
3
image_speed = 0;
4
loop = false;
5
throw_choco = false;
6
is_thrown = false;
7
base_alpha = 1;
8
depth = 80000;
9
bounce = false;
10
bounce_timer = 0;
11
bounce_bottle = -4;
12
bounce_xpos = 0;
13
bounce_ypos = 0;
14
15
create_puck = function(arg0, arg1, arg2)
16
{
17
    bounce_xpos = arg0;
18
    bounce_ypos = arg1;
19
    bounce_bottle = 
scr_marker
scr_marker

function
scr_marker(arg0, arg1, arg2)
{ thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { sprite_index = arg2; image_speed = 0; } return thismarker; }
(bounce_xpos, bounce_ypos, sprite_index);
20
    bounce_bottle.depth = arg2 - 1;
21
};
22
23
clean_up = function()
24
{
25
    with (bounce_bottle)
26
        
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
();
27
    var readable = instance_create(bounce_bottle.x - 2, bounce_bottle.y + 2, obj_readable_room1);
28
    with (readable)
29
    {
30
        extflag = "hockey_puck";
31
        image_xscale = 0.5;
32
        image_yscale = 0.5;
33
    }
34
    instance_destroy();
35
};