Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_shootout_vfx_mockup_enemy_Step_0

(view raw script w/o annotations or w/e)
1
image_xscale = 2;
2
image_yscale = 2;
3
depth = 20;
4
if (button1_p() && testhurt == 0)
5
    testhurt = 1;
6
if (button2_p())
7
    con = 1;
8
var gunx = x - 50;
9
var guny = y + 50;
10
if (con == 1)
11
{
12
    sprite_index = spr_shootout_tenna_shoot;
13
    var shot = instance_create(gunx, guny, obj_shootout_vfx_mockup_shot);
14
    shot.enemy = 1;
15
    shot.targetx = x - 200;
16
    shot.targety = y + 100;
17
    shot.sprite_index = spr_smallbullet;
18
    con = 2;
19
    var impactfx = instance_create(gunx, guny, obj_animation);
20
    impactfx.sprite_index = spr_attack_slap2;
21
    impactfx.image_speed = 2;
22
    impactfx.image_xscale = 1;
23
    impactfx.image_yscale = 1;
24
    impactfx.image_blend = c_white;
25
    impactfx.depth = depth - 10;
26
    impactfx = instance_create(gunx, guny, obj_animation);
27
    impactfx.sprite_index = spr_attack_slap2;
28
    impactfx.image_speed = 1;
29
    impactfx.image_xscale = 1;
30
    impactfx.image_yscale = 1;
31
    impactfx.image_blend = c_red;
32
    impactfx.depth = depth - 10;
33
    for (var i = 0; i < 8; i++)
34
    {
35
        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; }
(gunx, guny, spr_slidedust);
36
        smokefx.hspeed = random_range(-2, 8);
37
        smokefx.gravity_direction = 180;
38
        smokefx.gravity = 2 - random(0.4);
39
        smokefx.image_speed = 0.2;
40
        smokefx.image_xscale = 2 + random(1);
41
        smokefx.image_yscale = 2 + random(1);
42
        smokefx.vspeed = random_range(-4, 0);
43
        scr_lerp_var_instance(smokefx, "image_alpha", 0.6, 0, 12);
44
        
scr_doom
scr_doom

function
scr_doom(arg0, arg1)
{ with (instance_create_depth(0, 0, 0, obj_doom)) { alarm[0] target = arg0; } }
(smokefx, 12);
45
    }
46
}
47
if (testhurt == 1)
48
{
49
    image_index = 0;
50
    image_speed = 0;
51
    sprite_index = spr_shootout_tenna_hit;
52
    
scr_shakeobj
scr_shakeobj

function
scr_shakeobj()
{ var _shakeobj = instance_create(x, y, obj_shakeobj); _shakeobj.target = id; if (argument_count >= 1) { if (i_ex(argument0)) _shakeobj.target = argument0; } if (argument_count >= 2) { if (argument1 != -1) _shakeobj.shakeamt = argument1; } if (argument_count >= 3) { if (argument2 != -1) _shakeobj.shakereduct = argument2; } with (_shakeobj) event_user(0); }
(id, 24, 3);
53
    testhurt = 0;
54
    timer = 0;
55
}