Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_chefs_customer_Step_0

(view raw script w/o annotations or w/e)
1
if (specinit == 0)
2
{
3
    if (special)
4
    {
5
        snd_play(snd_shineselect);
6
        var makenote = false;
7
        if (makenote)
8
        {
9
            var specialnote = 
scr_marker_ext
scr_marker_ext

function
scr_marker_ext(arg0, arg1, arg2, arg3 = 1, arg4 = 1, arg5 = 0, arg6 = 0, arg7 = 16777215, arg8 = depth, arg9 = false, arg10 = -1, arg11 = 1)
{ var thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { depth = arg8; sprite_index = arg2; image_speed = arg5; image_xscale = arg3; image_yscale = arg4; image_index = arg6; image_blend = arg7; image_alpha = arg11; if (arg9)
scr_depth();
} if (arg10 > 0)
scr_doom(thismarker, arg10);
return thismarker; }
(4, 476, spr_ch3_chef_specialguestText, 2, 2);
10
            with (specialnote)
11
            {
12
                extflag = "specialnote";
13
                if (global.lang == "ja")
14
                    sprite_index = spr_ch3_chef_specialguestText_jpPLACEHOLDER;
15
                var timeamt = 2;
16
                scr_delay_var("visible", 0, timeamt * 1);
17
                scr_delay_var("visible", 1, timeamt * 2);
18
                scr_delay_var("visible", 0, timeamt * 3);
19
                scr_delay_var("visible", 4, timeamt * 4);
20
                
scr_doom
scr_doom

function
scr_doom(arg0, arg1)
{ with (instance_create_depth(0, 0, 0, obj_doom)) { alarm[0] target = arg0; } }
(id, timeamt * 30);
21
            }
22
        }
23
    }
24
    specinit = 1;
25
}
26
if (tenna)
27
    mask_index = spr_tenna_grasp_chef;
28
if (obj_chefs_game.gameover)
29
    exit;
30
if (!leaving)
31
{
32
    if (eating)
33
    {
34
        speed = 0;
35
        exit;
36
    }
37
    if (alarm[0] >= 0)
38
        sprite_index = sprEat;
39
    else
40
        sprite_index = sprWalk;
41
    switch (movetype)
42
    {
43
        case 1:
44
            t++;
45
            x = xstart + (cos(t * f) * a);
46
            if (x < xprevious)
47
                image_xscale = 2;
48
            else
49
                image_xscale = -2;
50
            image_speed = 1;
51
            break;
52
        default:
53
            if (!special)
54
            {
55
                if (x <= -24)
56
                    instance_destroy();
57
                hspeed = -2;
58
            }
59
            else
60
            {
61
                if (moves > 0)
62
                {
63
                    if (x > ((room_width / 4) * 3) && hspeed > 0)
64
                    {
65
                        moves--;
66
                        side = -1;
67
                    }
68
                    if (x < ((room_width / 4) * 1) && hspeed < 0)
69
                    {
70
                        moves--;
71
                        side = 1;
72
                    }
73
                }
74
                if (spriteset == 0)
75
                    image_xscale = side * -2;
76
                else
77
                    image_xscale = side * 2;
78
                hspeed = side * movespeed;
79
            }
80
            break;
81
    }
82
}
83
if (y > (room_height + 40) && leaving)
84
    instance_destroy();