Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_homealone_dess_closet_kris_alternate_Step_0

(view raw script w/o annotations or w/e)
1
if (pickup_stick)
2
{
3
    animate_timer++;
4
    if (animate_timer == 1)
5
        sprite_index = spr_noellehouse_dess_kris_reach_down;
6
    if (animate_timer == 6)
7
    {
8
        snd_play(snd_grab);
9
        stick_marker.visible = 0;
10
        sprite_index = spr_noellehouse_dess_kris_hockey_up;
11
        if (i_ex(obj_homealone_heart))
12
        {
13
            if (x > obj_homealone_heart.x)
14
                sprite_index = spr_noellehouse_dess_kris_hockey_up_left;
15
        }
16
    }
17
    if (animate_timer == 10)
18
    {
19
        pickup_stick = false;
20
        animate_timer = 0;
21
        kris_ready = true;
22
        sprite_index = spr_noellehouse_dess_kris_hockey_mid;
23
        if (i_ex(obj_homealone_heart))
24
        {
25
            if (x > obj_homealone_heart.x)
26
                sprite_index = spr_noellehouse_dess_kris_hockey_mid_left;
27
        }
28
        
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); }
();
29
    }
30
}
31
if (press_santa)
32
{
33
    animate_timer++;
34
    if (animate_timer == 1)
35
    {
36
        sprite_index = spr_noellehouse_dess_kris_reach_stick;
37
        if (x < 180)
38
            sprite_index = spr_noellehouse_dess_kris_hockey_mid_stand_press_left;
39
        image_index = 0;
40
    }
41
    if (animate_timer == 6)
42
    {
43
        press_santa = false;
44
        animate_timer = 0;
45
        snd_play(snd_noise);
46
        image_index = 1;
47
        
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); }
();
48
    }
49
}
50
if (kris_swing)
51
{
52
    animate_timer++;
53
    if (animate_timer == 1)
54
    {
55
        sprite_index = spr_noellehouse_dess_kris_hockey_swing;
56
        if (i_ex(obj_homealone_heart))
57
        {
58
            if (x > obj_homealone_heart.x)
59
                sprite_index = spr_noellehouse_dess_kris_hockey_swing_left;
60
        }
61
        
scr_animate
scr_animate

function
scr_animate(arg0, arg1, arg2)
{ __animator = instance_create(x, y, obj_animator); __animator.target = id; __animator.initframe = arg0; __animator.endframe = arg1; __animator.fake_image_speed = arg2; return __animator; }
(0, 3, 0.65);
62
    }
63
    if (animate_timer == 4)
64
        snd_play(snd_swing);
65
    if (animate_timer == 8)
66
        
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); }
();
67
    if (animate_timer == 16)
68
    {
69
        kris_swing = false;
70
        animate_timer = 0;
71
        sprite_index = spr_noellehouse_dess_kris_hockey_mid;
72
        if (i_ex(obj_homealone_heart))
73
        {
74
            if (x > obj_homealone_heart.x)
75
                sprite_index = spr_noellehouse_dess_kris_hockey_mid_left;
76
        }
77
    }
78
}