Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_regularbullet_elnina_Step_0

(view raw script w/o annotations or w/e)
1
if (!instance_exists(obj_heart))
2
    instance_destroy();
3
if (wall_destroy == 1)
4
{
5
    if (x < (__view_get(e__VW.XView, 0) - 80))
6
        instance_destroy();
7
    if (x > (__view_get(e__VW.XView, 0) + 760))
8
        instance_destroy();
9
    if (y < (__view_get(e__VW.YView, 0) - 80))
10
        instance_destroy();
11
    if (y > (__view_get(e__VW.YView, 0) + 580))
12
        instance_destroy();
13
}
14
if (updateimageangle == 1)
15
    image_angle = direction;
16
if (spin == 1)
17
    image_angle += spinspeed;
18
if (bottomfade != 0)
19
{
20
    if (y > (cameray() + bottomfade))
21
        image_alpha *= 0.8;
22
}
23
var checkcol = collision_rectangle(bbox_left - image_xscale - 2, bbox_top - image_yscale - 1, bbox_right + image_xscale + 2, bbox_bottom + image_yscale + 1, object_index, true, true);
24
if (checkcol != -4)
25
{
26
    if (checkcol.sprite_index == sprite_index)
27
        exit;
28
    if (sprite_index == spr_lanino_fire)
29
        exit;
30
    if (i_ex(obj_elnina_rematch_enemy))
31
        exit;
32
    if (i_ex(obj_elnina_lanino_controller) && obj_elnina_lanino_controller.turns <= 2)
33
    {
34
        if (sprite_index != spr_ch3_bullet_heart && checkcol.sprite_index != spr_ch3_bullet_heart)
35
        {
36
            sprite_index = spr_ch3_bullet_heart;
37
            checkcol.sprite_index = spr_ch3_bullet_heart;
38
            snd_play_x(snd_coaster_kiss, 0.7, 1 + random(0.2));
39
            var mypink = merge_color(c_fuchsia, c_white, 0.8);
40
            image_blend = mypink;
41
            checkcol.image_blend = mypink;
42
        }
43
    }
44
    else
45
    {
46
        snd_stop(snd_bump);
47
        snd_play(snd_bump);
48
        var shrinkball = 
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; }
(x, y, spr_ball_small);
49
        shrinkball.depth = depth;
50
        shrinkball.image_blend = c_gray;
51
        scr_lerp_var_instance(shrinkball, "image_xscale", image_xscale, 0, 8, -1, "in");
52
        scr_lerp_var_instance(shrinkball, "image_yscale", image_yscale, 0, 8, -1, "in");
53
        
scr_doom
scr_doom

function
scr_doom(arg0 = id, arg1)
{ with (instance_create_depth(0, 0, 0, obj_doom)) { alarm[0] target = arg0; persistent = arg0.persistent; } }
(shrinkball, 8);
54
        with (checkcol)
55
        {
56
            shrinkball = 
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; }
(x, y, spr_ball_small);
57
            shrinkball.depth = depth;
58
            shrinkball.image_blend = c_gray;
59
            scr_lerp_var_instance(shrinkball, "image_xscale", image_xscale, 0, 8, -1, "in");
60
            scr_lerp_var_instance(shrinkball, "image_yscale", image_yscale, 0, 8, -1, "in");
61
            
scr_doom
scr_doom

function
scr_doom(arg0 = id, arg1)
{ with (instance_create_depth(0, 0, 0, obj_doom)) { alarm[0] target = arg0; persistent = arg0.persistent; } }
(shrinkball, 8);
62
        }
63
        instance_destroy();
64
        with (checkcol)
65
            instance_destroy();
66
    }
67
}
68
69
enum e__VW
70
{
71
    XView,
72
    YView,
73
    WView,
74
    HView,
75
    Angle,
76
    HBorder,
77
    VBorder,
78
    HSpeed,
79
    VSpeed,
80
    Object,
81
    Visible,
82
    XPort,
83
    YPort,
84
    WPort,
85
    HPort,
86
    Camera,
87
    SurfaceID
88
}