Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_chefs_customer_Alarm_0

(view raw script w/o annotations or w/e)
1
if (leaving)
2
    exit;
3
var _score = foodscore;
4
if (special)
5
    _score = 40 + round(foodscore * 1.25);
6
if (foods_needed > 0)
7
{
8
    eating = 0;
9
    leaving = 0;
10
    exit;
11
}
12
var _text = instance_create_depth(x, y, depth - 10, obj_chefs_scoretxt);
13
_text.blurb = "+" + string(_score);
14
if (special)
15
{
16
    _text.blurb = stringsetloc(
BONUS
"BONUS", "obj_chefs_customer_slash_Alarm_0_gml_20_0"
) + " " + _text.blurb;
17
    _text.alarm[0] += 10;
18
}
19
repeat (floor(_score))
20
{
21
    with (instance_create((x - 30) + irandom(60), y + irandom(24), obj_chefs_coinvfx))
22
    {
23
        sprite_index = choose(spr_chefs_coin, spr_chefs_coin2, spr_chefs_coin3);
24
        image_index = irandom(3);
25
        vspeed = choose(-4, -6, -3, -5);
26
        alarm[0]
 = min(20 + irandom(10), 10 + irandom(_score / 2));
gml_Object_obj_chefs_customer_Alarm_0.gml

if (leaving) exit; var _score = foodscore; if (special) _score = 40 + round(foodscore * 1.25); if (foods_needed > 0) { eating = 0; leaving = 0; exit; } var _text = instance_create_depth(x, y, depth - 10, obj_chefs_scoretxt); _text.blurb = "+" + string(_score); if (special) { _text.blurb = stringsetloc(
BONUS
"BONUS", "obj_chefs_customer_slash_Alarm_0_gml_20_0"
) + " " + _text.blurb;
_text.alarm[0] += 10; } repeat (floor(_score)) { with (instance_create((x - 30) + irandom(60), y + irandom(24), obj_chefs_coinvfx)) { sprite_index = choose(spr_chefs_coin, spr_chefs_coin2, spr_chefs_coin3); image_index = irandom(3); vspeed = choose(-4, -6, -3, -5); alarm[0]
 = min(20 + irandom(10), 10 + irandom(_score / 2));
gravity = 0.2; gravity_direction = 270; } } leaving = true; hspeed = 0; vspeed = 10; sprite_index = sprLeave; if (special) snd_play_pitch(snd_bigscore, 1.3); else snd_play_pitch(snd_egg, 1.9);
27
        gravity = 0.2;
28
        gravity_direction = 270;
29
    }
30
}
31
leaving = true;
32
hspeed = 0;
33
vspeed = 10;
34
sprite_index = sprLeave;
35
if (special)
36
    snd_play_pitch(snd_bigscore, 1.3);
37
else
38
    snd_play_pitch(snd_egg, 1.9);