Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_vfx_test_Step_0

(view raw script w/o annotations or w/e)
1
if (playing)
2
{
3
    subtimer++;
4
    totaltimer++;
5
}
6
if (keyboard_check_pressed(vk_numpad7) || keyboard_check_pressed(vk_numpad8))
7
{
8
    snd_play(snd_punchmed, 1, ((count % 2) == 0) ? 1.2 : 0.8);
9
    if (!playing)
10
        playing = true;
11
    timestamps[count] = subtimer;
12
    count++;
13
    event_user(0);
14
    subtimer = 0;
15
    var _anim = instance_create_depth(camerax() + 320, cameray() + 240, depth - 10, obj_animation);
16
    _anim.depth = depth + 10;
17
    _anim.sprite_index = choose(spr_gerson_hit_fx1, spr_gerson_hit_fx2, spr_gerson_hit_fx3, spr_gerson_hit_fx4);
18
    _anim.image_speed = 0.5;
19
}
20
if (keyboard_check_pressed(vk_numpad9))
21
    playing = !playing;
22
if (keyboard_check_pressed(vk_delete))
23
{
24
    scr_debug_clear_persistent();
25
    playing = false;
26
    subtimer = 0;
27
    totaltimer = 0;
28
    timestamps = [];
29
    count = 0;
30
    event_user(0);
31
}