Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_shootout_vfx_mockup_kris_Step_0

(view raw script w/o annotations or w/e)
1
if (button1_p())
2
    shootcon = 1;
3
var fingerx = x + 28;
4
var fingery = y - 16;
5
if (shootcon == 1)
6
{
7
    sprite_index = spr_kris_ride_shoot;
8
    image_index = 0;
9
    image_speed = 0;
10
    var impactfx = instance_create(fingerx, fingery, obj_animation);
11
    impactfx.sprite_index = spr_attack_slap2;
12
    impactfx.image_xscale = 0.25;
13
    impactfx.image_yscale = 0.25;
14
    impactfx.image_blend = c_white;
15
    for (var i = 0; i < 8; i++)
16
    {
17
        var smokefx = 
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; }
(fingerx, fingery, spr_slidedust);
18
        smokefx.hspeed = random_range(-2, 8);
19
        smokefx.gravity_direction = 180;
20
        smokefx.gravity = 2 - random(0.4);
21
        smokefx.image_speed = 0.2;
22
        smokefx.image_xscale = 2 + random(1);
23
        smokefx.image_yscale = 2 + random(1);
24
        smokefx.vspeed = random_range(-4, 0);
25
        scr_lerp_var_instance(smokefx, "image_alpha", 0.6, 0, 12);
26
        
scr_doom
scr_doom

function
scr_doom(arg0, arg1)
{ with (instance_create_depth(0, 0, 0, obj_doom)) { alarm[0] target = arg0; } }
(smokefx, 12);
27
    }
28
    var hitheart = instance_create(fingerx, fingery, obj_shootout_vfx_mockup_shot);
29
    hitheart.targetx = x + 300;
30
    hitheart.targety = y - 100;
31
    snd_play_x(snd_punchmed, 0.8, 0.8 + random(0.2));
32
    timer = 0;
33
    shootcon = 2;
34
}
35
if (shootcon == 2)
36
{
37
    if (sprite_index == spr_kris_ride_shoot)
38
    {
39
        if (timer == 0)
40
            image_index = 0;
41
        if (timer == 1)
42
            image_index = 2;
43
        timer++;
44
        if (timer >= 6)
45
        {
46
            sprite_index = spr_kris_ride_1;
47
            image_index = 0;
48
            shootcon = 0;
49
        }
50
    }
51
}