Deltarune (Chapter 1) script viewer

← back to main script listing

gml_Object_obj_onion_event_Step_0

(view raw script w/o annotations or w/e)
1
if (instance_exists(obj_mainchara))
2
{
3
    if (onioncount > 0)
4
        onioncount -= 1;
5
    if (global.flag[258 onionsan_ch1] == 0)
6
    {
7
        if (onioncount >= 200 && con == 0 && global.flag[258 onionsan_ch1] == 0)
8
        {
9
            global.flag[258 onionsan_ch1] = 1;
10
            onioncount = 1;
11
            global.facing = 1;
12
            con = 1;
13
            alarm[4]
 = 10;
gml_Object_obj_onion_event_Alarm_4.gml

con += 1;
14
            global.interact = 1;
15
        }
16
    }
17
    if (con == 2)
18
    {
19
        with (onion)
20
            on = 1;
21
        con = 3;
22
        alarm[4]
 = 50;
gml_Object_obj_onion_event_Alarm_4.gml

con += 1;
23
    }
24
    if (con == 4)
25
    {
26
        global.facing = 1;
27
        with (onion)
28
            on = 2;
29
        con = 5;
30
        alarm[4]
 = 150;
gml_Object_obj_onion_event_Alarm_4.gml

con += 1;
31
    }
32
    if (con == 6)
33
    {
34
        global.fc = 0;
35
        global.typer = 5;
36
        global.msc = 195;
37
        
scr_text
scr_text

function
scr_text(arg0)
{ switch (arg0) { case 0: break; case 10: global.choicemsg[1] =
#Yes
scr_84_get_lang_string("scr_text_slash_scr_text_gml_7_0")
;
global.choicemsg[0] =
#No
scr_84_get_lang_string("scr_text_slash_scr_text_gml_8_0")
;
global.choicemsg[2] = " "; global.choicemsg[3] = " "; global.msg[0] =
* You really didn't want to throw it away.Wait for input
scr_84_get_lang_string("scr_text_slash_scr_text_gml_11_0")
;
global.msg[1] =
* Throw it away anyway?Wait for input
scr_84_get_lang_string("scr_text_slash_scr_text_gml_12_0")
;
global.msg[2] =
Choice type 2
scr_84_get_lang_string("scr_text_slash_scr_text_gml_13_0")
;
break; case 11: if (global.choice == 0) { global.msg[0] =
* You felt a feeling of relief.Wait for inputClose Message
scr_84_get_lang_string("scr_text_slash_scr_text_gml_19_0")
;
} else { global.msg[0] =
* Hand shaking,Delay 11 you dropped the ball of junk on the ground.Wait for input
scr_84_get_lang_string("scr_text_slash_scr_text_gml_23_0")
;
global.msg[1] =
* It broke into pieces.Wait for input
scr_84_get_lang_string("scr_text_slash_scr_text_gml_24_0")
;
global.msg[2] =
* You felt bitter.Wait for inputClose Message
scr_84_get_lang_string("scr_text_slash_scr_text_gml_25_0")
;
script_execute(scr_litemshift, global.menucoord[1], 0); for (i = 0; i < 12; i += 1) { global.item[i] = 0; global.weapon[i] = 0; global.armor[i] = 0; } } break; case 100: global.msg[0] =
* Hey, Kris!Delay 11 What's up?Delay 11
* Didja lose your pencil again?Wait for input
scr_84_get_lang_string("scr_text_slash_scr_text_gml_38_0")
;
global.msg[1] =
Face 4* Here,Delay 11 you want the candy-cane one or the one with lights on it?Wait for input
scr_84_get_lang_string("scr_text_slash_scr_text_gml_39_0")
;
global.msg[2] =
Face 1* Huh?Delay 11
* You want to be partners?Wait for input
scr_84_get_lang_string("scr_text_slash_scr_text_gml_40_0")
;
global.msg[3] =
Face 4* Ummm...Delay 11 Sorry...Delay 11
* Berdly already asked me...Wait for input
scr_84_get_lang_string("scr_text_slash_scr_text_gml_41_0")
;
global.msg[4] =
Face 0* But I could ask Ms. Alphys if we could make a group of 3!Wait for input
scr_84_get_lang_string("scr_text_slash_scr_text_gml_42_0")
;
global.msg[5] =
Face 4* I'll ask if you're sure!

Not yet Yes. Ask.Choice type 1
scr_84_get_lang_string("scr_text_slash_scr_text_gml_43_0")
;
global.msg[6] = " "; break; case 101: if (global.choice == 1) { global.msg[0] =
Face 0* OK,Delay 11 I'll ask!Wait for input
scr_84_get_lang_string("scr_text_slash_scr_text_gml_50_0")
;
global.msg[1] =
* Miss Alphys!Delay 11
* Umm,Delay 11 is it OK if we have a group of 3?Wait for inputClose Message
scr_84_get_lang_string("scr_text_slash_scr_text_gml_51_0")
;
with (obj_classscene) con = 20; } if (global.choice == 0) global.msg[0] =
Face 4* Yeah,Delay 11 I'm sure there's someone else you can ask!Wait for inputClose Message
scr_84_get_lang_string("scr_text_slash_scr_text_gml_56_0")
;
break; case 102: global.msg[0] =
Face 0* Do you wanna be partners?
Not yet YesChoice type 1
scr_84_get_lang_string("scr_text_slash_scr_text_gml_61_0")
;
global.msg[1] = " "; break; case 103: if (global.choice == 1) { global.msg[0] =
Face 0* OK,Delay 11 I'll ask!Wait for input
scr_84_get_lang_string("scr_text_slash_scr_text_gml_68_0")
;
global.msg[1] =
* Miss Alphys!Delay 11
* Umm,Delay 11 is it OK if we have a group of 3?Wait for inputClose Message
scr_84_get_lang_string("scr_text_slash_scr_text_gml_69_0")
;
with (obj_classscene) con = 20; } if (global.choice == 0) global.msg[0] =
Face 4* Umm,Delay 11 OK.Delay 11
* You just keep doing your thing,Delay 11 Kris.Wait for inputClose Message
scr_84_get_lang_string("scr_text_slash_scr_text_gml_74_0")
;
break; case 104: global.msg[0] =
Face 0* Alright.Delay 11
* Let's get this over with.Wait for input
scr_84_get_lang_string("scr_text_slash_scr_text_gml_79_0")
;
global.msg[1] =
* We'll get more chalk.Delay 11
* Mosey back to class.Delay 11
* And then,Delay 11 Kris...Wait for input
scr_84_get_lang_string("scr_text_slash_scr_text_gml_80_0")
;
global.msg[2] =
Face 2* YOU'LL do our project.Wait for input
scr_84_get_lang_string("scr_text_slash_scr_text_gml_81_0")
;
global.msg[3] =
* How's that sound?

Good BadChoice type 1
scr_84_get_lang_string("scr_text_slash_scr_text_gml_82_0")
;
global.msg[4] = " "; break; case 105: global.msg[0] = " %%"; break; case 110: global.choicemsg[0] =
#Yes
scr_84_get_lang_string("scr_text_slash_scr_text_gml_91_0")
;
global.choicemsg[1] =
#No
scr_84_get_lang_string("scr_text_slash_scr_text_gml_92_0")
;
global.choicemsg[2] = " "; global.choicemsg[3] = " "; if (global.flag[100 got_glowshard] == 0) { global.msg[0] =
* (There's something glowing inside.)Wait for input
scr_84_get_lang_string("scr_text_slash_scr_text_gml_97_0")
;
global.msg[1] =
* (Take it?)Wait for input
scr_84_get_lang_string("scr_text_slash_scr_text_gml_98_0")
;
global.msg[2] =
Choice type 2
scr_84_get_lang_string("scr_text_slash_scr_text_gml_99_0")
;
} else { global.msg[0] =
* (It's dark inside.)Wait for inputClose Message
scr_84_get_lang_string("scr_text_slash_scr_text_gml_103_0")
;
} break; case 111: if (global.choice == 0) { global.msg[0] =
* (You got the Glowshard.)Wait for inputClose Message
scr_84_get_lang_string("scr_text_slash_scr_text_gml_111_0")
;
global.flag[100 got_glowshard] = 1;
scr_itemget(3);
...
(global.msc);
38
        instance_create(0, 0, obj_dialoguer);
39
        con = 7;
40
    }
41
    if (con == 7 && !d_ex())
42
    {
43
        global.interact = 1;
44
        onion.on = 4;
45
        con = 8;
46
        alarm[4]
 = 150;
gml_Object_obj_onion_event_Alarm_4.gml

con += 1;
47
    }
48
    if (con == 9)
49
    {
50
        with (onion)
51
            instance_destroy();
52
        con = 10;
53
        global.interact = 0;
54
        global.facing = 0;
55
        instance_destroy();
56
    }
57
}