Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_sneo_phonecall_Step_0

(view raw script w/o annotations or w/e)
1
if (init == 0)
2
{
3
    y = -30;
4
    visible = true;
5
    init = 1;
6
}
7
if (state < 7)
8
{
9
    global.turntimer = 430;
10
    if (obj_spamton_neo_enemy.difficulty == 3)
11
        global.turntimer = 100;
12
}
13
if (talking)
14
{
15
    talktimer++;
16
    var aa = 0;
17
    if (obj_spamton_neo_enemy.difficulty == 3 && state >= 5)
18
        aa = 1;
19
    if (button1_p() && talktimer > 5 && aa == 0)
20
        talktimer = talkmax;
21
    if (button3_h() && talktimer > 1 && aa == 0)
22
        talktimer = talkmax;
23
    if (talktimer >= talkmax)
24
    {
25
        sneo.talktimer = sneo.talkmax;
26
        with (obj_writer)
27
            instance_destroy();
28
        talking = false;
29
        talktimer = -10;
30
        state++;
31
    }
32
    exit;
33
}
34
if (state == 6)
35
{
36
    if (scr_isphase
scr_isphase

function scr_isphase(arg0) { __isphase = 0; if (arg0 == "menu" && global.myfight == 0) __isphase = 1; if (arg0 == "acting" && global.myfight == 3) __isphase = 1; if (arg0 == "victory" && global.myfight == 7) __isphase = 1; if (arg0 == "attack" || arg0 == "fight") { if (global.myfight == 1) __isphase = 1; } if (arg0 == "spell" || arg0 == "item") { if (global.myfight == 4) __isphase = 1; } if (arg0 == "enemytalk" || arg0 == "balloon") { if (global.mnfight == 1) __isphase = 1; } if (arg0 == "enemyattack" || arg0 == "bullets") { if (global.mnfight == 2) __isphase = 1; } return __isphase; }
("bullets") || isattack)
37
    {
38
        if (!secondtime)
39
        {
40
            songtime = (songtime + resumeinterval) - (songtime % resumeinterval);
41
            if (songtime > 140)
42
                songtime = 0;
43
        }
44
        if (isattack)
45
        {
46
            if (obj_spamton_neo_enemy.difficulty == 3)
47
            {
48
                instance_create(obj_spamton_neo_enemy.x + obj_spamton_neo_enemy.partx[5], obj_spamton_neo_enemy.y + obj_spamton_neo_enemy.party[5] + 60, obj_sneo_phonecall_pipis_stream);
49
            }
50
            else
51
            {
52
                with (obj_sneo_bulletcontroller)
53
                    instance_destroy();
54
                var xx = scr_orbitx
scr_orbitx

function scr_orbitx(arg0, arg1, arg2, arg3, arg4) { if (arg4 == 0) return arg2; var __theta = point_direction(arg0, arg1, arg2, arg3); var __radius = point_distance(arg0, arg1, arg2, arg3); __theta += arg4; return arg0 + lengthdir_x(__radius, __theta); }
(0, 0, -26, secondtime ? 30 : 70, sneo.partrot[1]) + sneo.x + sneo.partx[1] + sneo.partxoff[1];
55
                var yy = scr_orbity
scr_orbity

function scr_orbity(arg0, arg1, arg2, arg3, arg4) { if (arg4 == 0) return arg3; var __theta = point_direction(arg0, arg1, arg2, arg3); var __radius = point_distance(arg0, arg1, arg2, arg3); __theta += arg4; return arg1 + lengthdir_y(__radius, __theta); }
(0, 0, -26, secondtime ? 30 : 70, sneo.partrot[1]) + sneo.y + sneo.party[1] + sneo.partyoff[1];
56
                global.monsterattackname[obj_spamton_neo_enemy.myself] = "FootballPipis";
57
                d = instance_create(xx, yy, obj_sneo_bulletcontroller);
58
                d.type = 1;
59
                d.damage = global.monsterat[obj_spamton_neo_enemy.myself] * 5;
60
                d.target = target;
61
            }
62
        }
63
        state = 7;
64
    }
65
    exit;
66
}
67
if (talktimer < 0)
68
{
69
    talktimer++;
70
}
71
else if (state == 0)
72
{
73
    if (!secondtime)
74
    {
75
    }
76
    ringtimer = 12;
77
    sndphone = snd_play(snd_phone);
78
    snd_volume(sndphone, 0.7, 0);
79
    talktimer = -10;
80
    state++;
81
}
82
else if (state == 1)
83
{
84
    talktimer = -10;
85
    state++;
86
    sneo.partmode = 6;
87
    if (skipintro == 1)
88
        state = 5;
89
}
90
else if (state == 2)
91
{
92
    if (obj_spamton_neo_enemy.difficulty == 3)
93
    {
94
        msgsetloc(0, 
WHAT!?
"WHAT!?", "obj_sneo_phonecall_slash_Step_0_gml_89_0"
);
95
    }
96
    else
97
    {
98
        msgsetloc(0, 
WHAT!?
"WHAT!?", "obj_sneo_phonecall_slash_Step_0_gml_96_0"
);
99
        sneo.partmode = 7;
100
    }
101
    writeline = true;
102
}
103
else if (state == 3)
104
{
105
    if (obj_spamton_neo_enemy.difficulty == 3)
106
    {
107
        state = 5;
108
    }
109
    else
110
    {
111
        msgsetloc(0, 
WHAT? ARE
YOU SERIOUS!?
"WHAT? ARE&YOU SERIOUS!?", "obj_sneo_phonecall_slash_Step_0_gml_136_0"
);
112
        sneo.partmode = 7;
113
        writeline = true;
114
    }
115
}
116
else if (state == 4)
117
{
118
    state = 5;
119
}
120
else if (state == 5)
121
{
122
    if (scr_isphase
scr_isphase

function scr_isphase(arg0) { __isphase = 0; if (arg0 == "menu" && global.myfight == 0) __isphase = 1; if (arg0 == "acting" && global.myfight == 3) __isphase = 1; if (arg0 == "victory" && global.myfight == 7) __isphase = 1; if (arg0 == "attack" || arg0 == "fight") { if (global.myfight == 1) __isphase = 1; } if (arg0 == "spell" || arg0 == "item") { if (global.myfight == 4) __isphase = 1; } if (arg0 == "enemytalk" || arg0 == "balloon") { if (global.mnfight == 1) __isphase = 1; } if (arg0 == "enemyattack" || arg0 == "bullets") { if (global.mnfight == 2) __isphase = 1; } return __isphase; }
("bullets") && skipintro == 0)
123
    {
124
        textboxoffsetx = 10;
125
        textboxoffsety = 20;
126
        if (obj_spamton_neo_enemy.difficulty == 3)
127
        {
128
            msgsetloc(0, 
IT'S FOR
ME!?
"IT'S FOR&ME!?", "obj_sneo_phonecall_slash_Step_0_gml_176_0"
);
129
        }
130
        else
131
        {
132
            msgsetloc(0, 
... IT'S
FOR YOU.
"... IT'S&FOR YOU.", "obj_sneo_phonecall_slash_Step_0_gml_138_0"
);
133
            sneo.partframe[1] = 3;
134
        }
135
        textboxdistance = 40;
136
        writeline = true;
137
    }
138
    else
139
    {
140
        state = 6;
141
    }
142
    with (sneo)
143
    {
144
        if (obj_spamton_neo_enemy.difficulty != 3)
145
        {
146
            partmode = 9;
147
            partrot[1] = -180;
148
            partframe[1] = 3;
149
        }
150
        else
151
        {
152
            partmode = 9;
153
            partframe[1] = 4;
154
        }
155
    }
156
}
157
if (writeline)
158
{
159
    writeline = false;
160
    with (obj_spamton_neo_enemy)
161
    {
162
        global.typer = 72;
163
        scr_enemyblcon
scr_enemyblcon

function scr_enemyblcon(arg0, arg1, arg2) { if (arg2 == 0) { mywriter = instance_create(arg0, arg1, obj_writer); return mywriter; } if (arg2 == 1) { myblcon = instance_create(arg0, arg1, obj_battleblcon); return myblcon; } if (arg2 == 2) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_v; return myblcon; } if (arg2 == 3) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_long; return myblcon; } if (arg2 == 4) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_clubs; myblcon.image_index = 0; myblcon.image_speed = 0; return myblcon; } if (arg2 == 5) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_clubs; myblcon.image_index = 1; myblcon.image_speed = 0; return myblcon; } if (arg2 == 6) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_clubs; myblcon.image_index = 2; myblcon.image_speed = 0; return myblcon; } if (arg2 == 7) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_long_r; myblcon.image_index = 2; myblcon.image_speed = 0; return myblcon; } if (arg2 == 8) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_long_tall; return myblcon; } if (arg2 == 10) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_long; myblcon.auto_length = 1; return myblcon; } }
(((x - obj_sneo_phonecall.textboxdistance) + 22) - obj_sneo_phonecall.textboxoffsetx, y + 60 + obj_sneo_phonecall.textboxoffsety, 10);
164
    }
165
    talktimer = 0;
166
    talking = true;
167
}