Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_titan_battle_finger_Create_0

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

function
scr_bullet_init()
{ grazed = 0; grazetimer = 0; destroyonhit = 1; target = 0; inv = 60; damage = 10; element = 0; grazepoints = 1; timepoints = 1; active = 1; updateimageangle = 0; }
();
2
scr_darksize
scr_darksize

function
scr_darksize()
{ var inst = id; if (argument_count) inst = argument0; inst.image_xscale = 2; inst.image_yscale = 2; }
();
3
wibbly_cooldown = 10;
4
active = false;
5
destroyonhit = false;
6
scr_var_delayed("active", true, 30);
7
light_rate = 0.0025;
8
with (obj_titan_enemy)
9
{
10
    if (phase < 6)
11
        other.light_rate = 0.00625;
12
    if (phase < 4)
13
        other.light_rate = 0.004375;
14
    if (phase < 2)
15
        other.light_rate = 0.0025;
16
}
17
image_speed = 0;
18
visible = false;
19
mask_index = spr_titan_battle_finger_dark_mask;
20
break_store = "nothing";
21
counter = 3;
22
light = 0;
23
weakspot_sprite = 4096;
24
weak_dist = 40;
25
weak_off[0] = 0;
26
weak_off[1] = 10;
27
weak_off[2] = 14;
28
weak_off[3] = 14;
29
weak_off[4] = 15;
30
weak_off[5] = 14;
31
weak_off[6] = 14;
32
weak_off[7] = 10;
33
weak_bonus = 52;
34
35
wibbly_bullets = function()
36
{
37
    var randlength = 110 + irandom(20);
38
    with (
scr_fire_bullet
scr_fire_bullet

function
scr_fire_bullet(arg0, arg1, arg2, arg3, arg4, arg5 = -4, arg6 = 0, arg7 = false, arg8 = 87135)
{ var bullet; if (arg8 != 87135) bullet = instance_create_depth(arg0, arg1, arg8, arg2); else bullet = instance_create(arg0, arg1, arg2); with (bullet) { direction = arg3; speed = arg4; if (arg5 != -4) sprite_index = arg5; updateimageangle = arg6; if (arg6) image_angle = arg3; if (arg7) { with (other)
scr_bullet_inherit(other.id);
} } return bullet; } function scr_fire_bullet_colorize(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 = 0) { var bullet = instance_create(arg0, arg1, arg2); with (bullet) { direction = arg3; speed = arg4; sprite_index = arg5; image_blend = arg6; updateimageangle = arg7; if (arg7) image_angle = arg3; } return bullet; }
(x + lengthdir_x(randlength, image_angle), y + lengthdir_y(randlength, image_angle), obj_regularbullet, irandom(360), 0, spr_wibblywobbly_dark_bullet))
39
    {
40
        damage = 90;
41
        target = 4;
42
        parent_id = other.master.id;
43
        image_speed = 0.5;
44
        
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; }
("speed", 0, 1.5, 60);
45
        image_xscale = 0;
46
        image_yscale = 0;
47
        
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_xscale", 0, 2, 15, 1, "out");
48
        
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_yscale", 0, 2, 15, 1, "out");
49
    }
50
};
51
52
darkdraw = function()
53
{
54
    var cur_weak_dist = (weak_dist - (weak_off[image_index] * 2)) + weak_bonus;
55
    var hx = obj_heart.x + 10;
56
    var hy = obj_heart.y + 10;
57
    var myx = x + lengthdir_x(cur_weak_dist, image_angle);
58
    var myy = y + lengthdir_y(cur_weak_dist, image_angle);
59
    var xshake, yshake;
60
    if (point_distance(myx, myy, hx, hy) < 64)
61
    {
62
        xshake = choose(-1, 0, 1);
63
        yshake = choose(-1, 0, 1);
64
    }
65
    else
66
    {
67
        xshake = 0;
68
        yshake = 0;
69
    }
70
    draw_sprite_ext(spr_titan_battle_finger_dark, image_index, x - __view_get(e__VW.XView, 0), y - __view_get(e__VW.YView, 0), image_xscale, image_yscale, image_angle, image_blend, image_alpha);
71
    draw_sprite_ext(weakspot_sprite, 3 - image_index, (x + lengthdir_x(cur_weak_dist, image_angle) + xshake) - __view_get(e__VW.XView, 0), (y + lengthdir_y(cur_weak_dist, image_angle) + yshake) - __view_get(e__VW.YView, 0), image_xscale, image_yscale, image_angle - (15 * image_yscale), image_blend, image_alpha);
72
    gpu_set_blendmode(bm_add);
73
    d3d_set_fog(true, c_white, 0, 0);
74
    draw_sprite_ext(spr_titan_battle_finger_dark, image_index, x - __view_get(e__VW.XView, 0), y - __view_get(e__VW.YView, 0), image_xscale, image_yscale, image_angle, image_blend, light);
75
    draw_sprite_ext(weakspot_sprite, 3 - image_index, (x + lengthdir_x(cur_weak_dist, image_angle) + xshake) - __view_get(e__VW.XView, 0), (y + lengthdir_y(cur_weak_dist, image_angle) + yshake) - __view_get(e__VW.YView, 0), image_xscale, image_yscale, image_angle - (15 * image_yscale), image_blend, light);
76
    d3d_set_fog(false, c_white, 0, 0);
77
    gpu_set_blendmode(bm_normal);
78
};
79
80
enum e__VW
81
{
82
    XView,
83
    YView,
84
    WView,
85
    HView,
86
    Angle,
87
    HBorder,
88
    VBorder,
89
    HSpeed,
90
    VSpeed,
91
    Object,
92
    Visible,
93
    XPort,
94
    YPort,
95
    WPort,
96
    HPort,
97
    Camera,
98
    SurfaceID
99
}