Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_ch4_DCC00_jackenstein_Step_0

(view raw script w/o annotations or w/e)
1
if (current_mode == 1)
2
{
3
    if (up_h())
4
    {
5
        if (current_state == 0)
6
            image_index += 1;
7
        change_state(1);
8
    }
9
    else if (down_p())
10
    {
11
        x = fixed_x_pos;
12
        
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); }
();
13
    }
14
    else
15
    {
16
    }
17
    if (current_state == 1)
18
    {
19
        if (floor(image_index) != 2 && floor(image_index) != 0)
20
            y -= (6 * climb_speed);
21
        if (dust_timer == 10)
22
            dust_timer = 0;
23
        if (floor(image_index) == 2)
24
        {
25
            if (floor(image_was) != 2)
26
            {
27
                y -= (10 * climb_speed);
28
                dust_timer = 0;
29
                if (!up_h())
30
                    change_state(0);
31
                dust_effect();
32
                crack_a_row();
33
            }
34
        }
35
        if (floor(image_index) == 0 && floor(image_was) != 0)
36
        {
37
            y -= (10 * climb_speed);
38
            dust_timer = 0;
39
            if (!up_h())
40
                change_state(0);
41
            dust_effect();
42
            crack_a_row();
43
        }
44
    }
45
    image_was = image_index;
46
}