Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_pumpkin_yell_proof_Step_0

(view raw script w/o annotations or w/e)
1
if (init == 0)
2
{
3
    snd_stop(snd_pumpkin_scream);
4
    snd_stop(snd_pumpkin_scream_mama);
5
    screamsound = snd_loop(snd_pumpkin_scream_mama);
6
    init = 1;
7
    screamcon = 3;
8
}
9
snd_pitch(screamsound, 1 + (mercy / 34));
10
jumptimer++;
11
if (jumptimer >= jumpthreshold)
12
{
13
    var audiopos = audio_sound_get_track_position(screamsound);
14
    audio_sound_set_track_position(screamsound, audiopos + random_range(-3, 3));
15
    jumptimer = 0;
16
    jumpthreshold = 2 + random(17);
17
}
18
if (screamcon == 0)
19
{
20
}
21
if (screamcon == 1)
22
{
23
    snd_pause(screamsound);
24
    screamcon = 0;
25
}
26
if (screamcon == 2)
27
{
28
    snd_resume(screamsound);
29
    screamcon = 3;
30
}
31
if (screamcon == 3)
32
{
33
    x += random_range(-1, 1);
34
    y += random_range(-1, 1);
35
}
36
if (
scr_debug
scr_debug

function
scr_debug()
{ if (global.debug == 1) return 1; }
())
37
{
38
    if (keyboard_check_pressed(vk_backspace))
39
        init = 0;
40
    if (keyboard_check_pressed(vk_space))
41
        screamcon = choose(1, 2);
42
    if (up_h())
43
        mercy++;
44
    if (down_h())
45
        mercy--;
46
    if (mercy >= 100)
47
        mercy = 100;
48
    if (mercy < 0)
49
        mercy = 0;
50
    image_xscale = 2 - (mercy / 100);
51
    image_yscale = 2 - (mercy / 100);
52
}