Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_board_cactusmanager_Step_0

(view raw script w/o annotations or w/e)
1
scr_board_populatevars
scr_board_populatevars

function
scr_board_populatevars()
{ if (!variable_instance_exists(id, "kris")) kris = 0; if (!variable_instance_exists(id, "susie")) susie = 0; if (!variable_instance_exists(id, "ralsei")) ralsei = 0; if (kris == 0) { with (obj_mainchara_board) { if (name == "kris") other.kris = id; } } if (ralsei == 0) { with (obj_mainchara_board) { if (name == "ralsei") other.ralsei = id; } } if (susie == 0) { with (obj_mainchara_board) { if (name == "susie") other.susie = id; } } }
();
2
scr_gameshow_populatevars
scr_gameshow_populatevars

function
scr_gameshow_populatevars()
{ if (!variable_instance_exists(id, "kr_real")) kr_real = 0; if (!variable_instance_exists(id, "su_real")) su_real = 0; if (!variable_instance_exists(id, "ra_real")) ra_real = 0; if (!variable_instance_exists(id, "tenna")) tenna = 0; if (kr_real == 0) { with (obj_mainchara) other.kr_real = id; } if (su_real == 0) { with (obj_caterpillarchara) { if (name == "susie") other.su_real = id; } } if (ra_real == 0) { with (obj_caterpillarchara) { if (name == "ralsei") other.ra_real = id; } } if (tenna == 0) { with (obj_actor_tenna) other.tenna = id; } }
();
3
active = 0;
4
if (obj_b1cactusfield1.active || obj_b1cactusfield2.active)
5
    active = 1;
6
if (active == 1)
7
{
8
    if (!i_ex(obj_quizchaser))
9
    {
10
        if ((hitcount % 2) == 0)
11
        {
12
            if (kris.iframes > 0)
13
                hitcount++;
14
        }
15
        if ((hitcount % 2) != 0)
16
        {
17
            if (kris.iframes == 0)
18
                hitcount++;
19
        }
20
    }
21
    if (hittalk == 0)
22
    {
23
        if (hitcount == 1)
24
        {
25
            var tetalk = stringsetloc(
Ouch! Don't touch the cactuses!
"Ouch! Don't touch the cactuses!", "obj_board_cactusmanager_slash_Step_0_gml_34_0"
);
26
            with (obj_actor_tenna)
27
                bounce = 1;
28
            
scr_couchtalk
scr_couchtalk

function scr_couchclear(arg0) { with (obj_couchwriter) { if (speaker == arg0) instance_destroy(); } } function
scr_couchtalk(arg0, arg1)
{ var ix = -1; var iy = -1; if (argument_count >= 6) { ix = argument4; iy = argument5; } var couchtext = instance_create_depth(ix, iy, 5000, obj_couchwriter); couchtext.mystring = arg0; couchtext.speaker = arg1; if (argument_count >= 3) couchtext.cleartext = argument2; if (argument_count >= 4) couchtext.drawtime = argument3; if (argument_count >= 7) couchtext.customsnd = argument6; if (argument_count >= 8) couchtext.customcolor = argument7; if (argument_count >= 9) couchtext.talkrate = argument8; if (argument_count >= 10) couchtext.talklength = argument9; return couchtext; }
(tetalk, "tenna", 2);
29
            hittalk = 1;
30
        }
31
    }
32
    if (hittalk == 1)
33
    {
34
        if (hitcount >= 7)
35
        {
36
            hittalk = 2;
37
            timer = 0;
38
        }
39
    }
40
    if (hittalk == 2)
41
    {
42
        timer++;
43
        if (timer == 1)
44
        {
45
            var tetalk = stringsetloc(
Don't touch the cactuses!
"Don't touch the cactuses!", "obj_board_cactusmanager_slash_Step_0_gml_53_0"
);
46
            with (obj_actor_tenna)
47
                bounce = 1;
48
            
scr_couchtalk
scr_couchtalk

function scr_couchclear(arg0) { with (obj_couchwriter) { if (speaker == arg0) instance_destroy(); } } function
scr_couchtalk(arg0, arg1)
{ var ix = -1; var iy = -1; if (argument_count >= 6) { ix = argument4; iy = argument5; } var couchtext = instance_create_depth(ix, iy, 5000, obj_couchwriter); couchtext.mystring = arg0; couchtext.speaker = arg1; if (argument_count >= 3) couchtext.cleartext = argument2; if (argument_count >= 4) couchtext.drawtime = argument3; if (argument_count >= 7) couchtext.customsnd = argument6; if (argument_count >= 8) couchtext.customcolor = argument7; if (argument_count >= 9) couchtext.talkrate = argument8; if (argument_count >= 10) couchtext.talklength = argument9; return couchtext; }
(tetalk, "tenna", 2, 80);
49
        }
50
        if (timer == 81)
51
        {
52
            var tetalk = stringsetloc(
They're very fragile and expensive!
"They're very fragile and expensive!", "obj_board_cactusmanager_slash_Step_0_gml_59_0"
);
53
            with (obj_actor_tenna)
54
                bounce = 1;
55
            
scr_couchtalk
scr_couchtalk

function scr_couchclear(arg0) { with (obj_couchwriter) { if (speaker == arg0) instance_destroy(); } } function
scr_couchtalk(arg0, arg1)
{ var ix = -1; var iy = -1; if (argument_count >= 6) { ix = argument4; iy = argument5; } var couchtext = instance_create_depth(ix, iy, 5000, obj_couchwriter); couchtext.mystring = arg0; couchtext.speaker = arg1; if (argument_count >= 3) couchtext.cleartext = argument2; if (argument_count >= 4) couchtext.drawtime = argument3; if (argument_count >= 7) couchtext.customsnd = argument6; if (argument_count >= 8) couchtext.customcolor = argument7; if (argument_count >= 9) couchtext.talkrate = argument8; if (argument_count >= 10) couchtext.talklength = argument9; return couchtext; }
(tetalk, "tenna", 2, 120);
56
        }
57
    }
58
}
59
else
60
{
61
}