Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_spotlightlaser_Create_0

(view raw script w/o annotations or w/e)
1
timer = 0;
2
con = 0;
3
siner = 9;
4
laser_xscale = 0;
5
laser_yscale = 0;
6
image_xscale = 0.45;
7
image_yscale = 1;
8
image_alpha = 0;
9
facing = 0;
10
change_sides = false;
11
friendly = false;
12
knockback = 10;
13
draw_angle = 0;
14
bounce_off_dir = -100;
15
myxcenter = x;
16
myycenter = y;
17
myhitscale = 4;
18
force_depth = -999999;
19
change_sides = false;
20
unstoppable = true;
21
destroy_onhit = false;
22
damage = 1;
23
knockback = 20;
24
25
bounce_off = function()
26
{
27
    with (instance_create_depth(x, y, depth, obj_dozer_parts))
28
    {
29
        sprite_index = other.sprite_index;
30
        image_angle = irandom(360);
31
        
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpvar_respect() { if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true; return ___lerpvar; }
("image_angle", image_angle, image_angle + ((90 + irandom(270)) * choose(-1, 1)), 30 + irandom(60));
32
        image_speed = 0;
33
        image_index = 0;
34
        image_xscale = other.image_xscale;
35
        image_yscale = image_xscale;
36
        if (other.bounce_off_dir == -100)
37
            h_speed = (-sign(other.facing) * 1) + (random(5) * -sign(other.facing));
38
        else
39
            h_speed = other.bounce_off_dir + (random(5) * other.bounce_off_dir);
40
        v_speed = -4 - random(8);
41
        do_shadow = true;
42
        ground = other.y + 60;
43
    }
44
};