forked from fachinformatiker/undertale
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathobj_controlspear.object.gmx
232 lines (232 loc) · 8.74 KB
/
obj_controlspear.object.gmx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<object>
<spriteName>spr_undynespear_end</spriteName>
<solid>0</solid>
<visible>-1</visible>
<depth>100000</depth>
<persistent>0</persistent>
<parentName><undefined></parentName>
<maskName><undefined></maskName>
<events>
<event eventtype="0" enumb="0">
<action>
<libid>1</libid>
<id>603</id>
<kind>7</kind>
<userelative>0</userelative>
<isquestion>0</isquestion>
<useapplyto>-1</useapplyto>
<exetype>2</exetype>
<functionname></functionname>
<codestring></codestring>
<whoName>self</whoName>
<relative>0</relative>
<isnot>0</isnot>
<arguments>
<argument>
<kind>1</kind>
<string>image_angle= 140;
dirdir= 0;
active= 1;
part= 0;
undyne= obj_undynedate_inside.undyne;
hotchocolate= obj_undynedate_inside.hotchocolate;
teabox= obj_undynedate_inside.teabox;
sugar= obj_undynedate_inside.sugar;
soda= obj_undynedate_inside.soda;
sel_undyne= 0;
sel_hotchocolate= 0;
sel_teabox= 0;
sel_sugar= 0;
sel_soda= 0;
everselect= 0;
buffer= 0;
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="8" enumb="0">
<action>
<libid>1</libid>
<id>603</id>
<kind>7</kind>
<userelative>0</userelative>
<isquestion>0</isquestion>
<useapplyto>-1</useapplyto>
<exetype>2</exetype>
<functionname></functionname>
<codestring></codestring>
<whoName>self</whoName>
<relative>0</relative>
<isnot>0</isnot>
<arguments>
<argument>
<kind>1</kind>
<string>draw_sprite_ext(sprite_index, image_index, x, y, 1, 1, image_angle, 16777215, 1);
if(active == 1) {
draw_set_color(16777215);
draw_rectangle(view_xview[view_current] + 16, view_yview[view_current] + 180, view_xview[view_current] + 304, view_yview[view_current] + 235, 0);
draw_set_color(0);
draw_rectangle(view_xview[view_current] + 19, view_yview[view_current] + 183, view_xview[view_current] + 301, view_yview[view_current] + 232, 0);
draw_set_color(16777215);
draw_set_font(2);
buffer= -1;
if(everselect == 0)
mytext= "* Aim with arrows and select with [Z].";
if(everselect != 0) mytext= " ";
if(everselect > 1) everselect--;
if(active == 1) {
if(keyboard_check(37/* LEFT */) && image_angle < 170)
image_angle+= 1.5;
if(keyboard_check(39/* RIGHT */) && image_angle > 10)
image_angle-= 1.5;
}
select= 0;
draw_set_color(255);
getdir= image_angle;
xdir= lengthdir_x(300, getdir);
ydir= lengthdir_y(300, getdir);
col= -4;
col2= collision_line(x, y, x + xdir, y + ydir, undyne, 0, 1);
if(collision_line(x, y, x + xdir, y + ydir, teabox, 0, 1)) {
if(everselect < 2 && !snd_isplaying(114/* snd_squeak */))
snd_play(114/* snd_squeak */);
everselect= 3;
select= teabox;
mytext= "* Teabox - Blatantly correct choice.#* Select with [Z].";
}
if(collision_line(x, y, x + xdir, y + ydir, hotchocolate, 0, 1)) {
if(everselect < 2 && !snd_isplaying(114/* snd_squeak */))
snd_play(114/* snd_squeak */);
everselect= 3;
select= hotchocolate;
mytext= "* Hot Chocolate - Green cylinder.#* Select with [Z].";
}
if(collision_line(x, y, x + xdir, y + ydir, soda, 0, 1)) {
if(everselect < 2 && !snd_isplaying(114/* snd_squeak */))
snd_play(114/* snd_squeak */);
everselect= 3;
select= soda;
mytext= "* Soda - Sickly yellow liquid.#* Select with [Z].";
}
if(collision_line(x, y, x + xdir, y + ydir, sugar, 0, 1)) {
if(everselect < 2 && !snd_isplaying(114/* snd_squeak */))
snd_play(114/* snd_squeak */);
everselect= 3;
select= sugar;
mytext= "* Sugar - Goes in tea.#* Select with [Z].";
}
if(col2 == undyne) {
if(everselect < 2 && !snd_isplaying(114/* snd_squeak */))
snd_play(114/* snd_squeak */);
everselect= 3;
select= undyne;
mytext= "* Undyne.#* Select with [Z].";
}
if(image_angle >= 53 && image_angle <= 66) {
if(everselect < 2 && !snd_isplaying(114/* snd_squeak */))
snd_play(114/* snd_squeak */);
select= 9;
everselect= 3;
mytext= "* Fridge - Full of food.#* Select with [Z].";
}
if(image_angle >= 17 && image_angle <= 41) {
if(everselect < 2 && !snd_isplaying(114/* snd_squeak */))
snd_play(114/* snd_squeak */);
select= 10;
everselect= 3;
mytext= "* Sword - Acquired taste.#* Select with [Z].";
}
if(keyboard_multicheck_pressed(0/* NOKEY */) && active == 1 && buffer < 1 && select != 0) {
global.facechoice= 5;
global.msc= 0;
global.faceemotion= 0;
active= 2;
if(select == undyne) {
global.faceemotion= 1;
global.msg[0]= "\\E1* ... are you.../";
global.msg[1]= "\\E5* Hitting on me????/%%";
if(sel_undyne > 0) {
global.faceemotion= 5;
global.msg[0]= "* ????????????????/%%";
}
sel_undyne++;
}
if(select == sugar) {
global.faceemotion= 9;
global.msc= 708;
if(sel_sugar > 0) {
global.msc= 0;
global.msg[0]= "* The sugar is for& tea^1, mmm\'kay?/%%";
}
sel_sugar++;
}
if(select == soda) {
global.faceemotion= 9;
global.msg[0]= "* Oh^1, soda?/";
global.msg[1]= "\\E4* Actually^1, even though& you pointed to it^1,& you don\'t look happy./";
global.msg[2]= "\\E0* Heh^1, that\'s fine^1!&* I think soda\'s gross^1,& too!/";
global.msg[3]= "\\E4* It rots your teeth..^1.&* It rots your mind.../";
global.msg[4]= "\\E1* IT ROTS YOUR FIGHTING& SPIRIT!/";
global.msg[5]= "\\E9* ... huh^1?&* Why do I have it?/";
global.msg[6]= "\\E8* .../%%";
if(sel_soda > 0)
global.msg[0]= "* What^1?&* You wanna throw the& spear at it?/%%";
sel_soda++;
}
if(select == hotchocolate) {
global.faceemotion= 9;
global.msg[0]= "* Oh^1, you want some& hot chocolate?/";
global.msg[1]= "\\E1* Wait^1, wait^1, I just& remembered..^1.&* That container\'s empty./";
global.msg[2]= "\\E9* I stopped getting& it because it was& always a hassle.../";
global.msg[3]= "\\E6* ASGORE kept getting& marshmallows stuck in& his beard./%%";
if(sel_hotchocolate > 0)
global.msg[0]= "* That container\'s empty./%%";
sel_hotchocolate++;
}
if(select == teabox) {
global.faceemotion= 9;
global.msg[0]= "\\E9* ... tea^1, huh^1?&* Coming right up!/%%";
obj_undynedate_inside.con= 300;
active= 3;
}
if(select == 9) {
global.faceemotion= 2;
global.msg[0]= "* The fridge!^1?&* You want to have& the entire fridge!?/";
global.msg[1]= "\\E1* No!/%%";
}
if(select == 10) {
global.faceemotion= 3;
global.msg[0]= "* Believe me^1, I would& GLADLY give you your& fill of swords./";
global.msg[1]= "\\E9* If you weren\'t my& beloved houseguest!/%%";
}
gh= instance_create(0, 0, 779/* obj_dialoguer */);
if(select != sugar) gh.side= 1;
}
draw_set_color(16777215);
draw_text(24, 186, mytext);
}
if(active == 2 && !instance_exists(782/* OBJ_WRITER */)) {
active= 1;
buffer= 12;
}
</string>
</argument>
</arguments>
</action>
</event>
</events>
<PhysicsObject>0</PhysicsObject>
<PhysicsObjectSensor>0</PhysicsObjectSensor>
<PhysicsObjectShape>0</PhysicsObjectShape>
<PhysicsObjectDensity>0.5</PhysicsObjectDensity>
<PhysicsObjectRestitution>0.100000001490116</PhysicsObjectRestitution>
<PhysicsObjectGroup>0</PhysicsObjectGroup>
<PhysicsObjectLinearDamping>0.100000001490116</PhysicsObjectLinearDamping>
<PhysicsObjectAngularDamping>0.100000001490116</PhysicsObjectAngularDamping>
<PhysicsObjectFriction>0.200000002980232</PhysicsObjectFriction>
<PhysicsObjectAwake>-1</PhysicsObjectAwake>
<PhysicsObjectKinematic>0</PhysicsObjectKinematic>
<PhysicsShapePoints/>
</object>