Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_elnina_umbrella_Collision_obj_regularbullet_elnina

(view raw script w/o annotations or w/e)
1
var bouncingbullet = 0;
2
if (other.object_index == obj_elnina_bouncingbullet)
3
    bouncingbullet = 1;
4
if ((sprite_index == spr_ch3_elnina_umbrella && other.sprite_index == spr_ch3_bullet_raindrop) || (sprite_index == spr_ch3_elnina_sunglasses && other.sprite_index == spr_ch3_bullet_sun) || (sprite_index == spr_ch3_elnina_warmhat && other.sprite_index == spr_ch3_bullet_ice) || (sprite_index == spr_ch3_elnina_telescope && other.sprite_index == spr_ch3_bullet_moon))
5
{
6
    mercy += 1.6;
7
    snd_stop(snd_wing);
8
    snd_play_x(snd_wing, 0.5, 1 + (count / 40));
9
}
10
else if (other.sprite_index == spr_lanino_fire)
11
{
12
    mercy -= 5;
13
    snd_play_x(snd_motor_upper_2, 0.5, 1.3);
14
    image_alpha2 = 1.4;
15
    with (other)
16
        
scr_afterimage_grow
scr_afterimage_grow

function
scr_afterimage_grow()
{ afterimage = instance_create(x, y, obj_afterimage_grow); afterimage.sprite_index = sprite_index; afterimage.image_index = image_index; afterimage.image_blend = image_blend; afterimage.image_speed = 0; afterimage.depth = depth; afterimage.image_xscale = image_xscale; afterimage.image_yscale = image_yscale; afterimage.image_angle = image_angle; return afterimage; }
();
17
    with (obj_lanino_rematch_enemy)
18
    {
19
        talking = true;
20
        laughtimer = 90;
21
        head = 679;
22
    }
23
    with (obj_elnina_rematch_enemy)
24
    {
25
        talking = true;
26
        laughtimer = 90;
27
        head = 1196;
28
    }
29
}
30
else
31
{
32
    mercy += 0.8;
33
    snd_stop(snd_wing);
34
    snd_play_x(snd_wing, 0.5, 1 + (count / 40));
35
}
36
if (i_ex(obj_elnina_rematch_enemy) && global.mercymod[obj_elnina_rematch_enemy.myself] < 90)
37
{
38
    if ((mercy + global.mercymod[obj_elnina_rematch_enemy.myself]) > 90)
39
        mercy = 90 - global.mercymod[obj_elnina_rematch_enemy.myself];
40
    if (mercy < 0)
41
        mercy = 0;
42
    if (!i_ex(obj_dmgwriter_boogie))
43
    {
44
        with (obj_lanino_rematch_enemy)
45
        {
46
            __mercydmgwriter = instance_create_depth(global.monsterx[myself], global.monstery[myself] + 40, depth - 99999, obj_dmgwriter_boogie);
47
            __mercydmgwriter.damage = other.mercy;
48
            __mercydmgwriter.type = 5;
49
        }
50
        with (obj_elnina_rematch_enemy)
51
        {
52
            __mercydmgwriter = instance_create_depth(global.monsterx[myself], global.monstery[myself] + 40, depth - 99999, obj_dmgwriter_boogie);
53
            __mercydmgwriter.damage = other.mercy;
54
            __mercydmgwriter.type = 5;
55
        }
56
    }
57
}
58
else
59
{
60
    mercy = 0;
61
}
62
image_alpha = 1.2;
63
count++;
64
if (!bouncingbullet)
65
{
66
    with (other)
67
    {
68
        var afterimage = 
scr_afterimage
scr_afterimage

function
scr_afterimage()
{ afterimage = instance_create(x, y, obj_afterimage); afterimage.sprite_index = sprite_index; afterimage.image_index = image_index; afterimage.image_blend = image_blend; afterimage.image_speed = 0; afterimage.depth = depth; afterimage.image_xscale = image_xscale; afterimage.image_yscale = image_yscale; afterimage.image_angle = image_angle; return afterimage; }
();
69
        afterimage.sprite_index = spr_rabbick_dustorb;
70
        afterimage.direction = random(360);
71
        afterimage.image_alpha = 0.8;
72
        afterimage.speed = 4;
73
        afterimage.image_xscale = 0.5;
74
        afterimage.image_yscale = 0.5;
75
        afterimage.friction = 0.334;
76
        instance_destroy();
77
    }
78
}