-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathroom1.asc
508 lines (346 loc) · 11.5 KB
/
room1.asc
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
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
// room script file
function room_FirstLoad()
{
//chalmers doorbell timer
SetTimer(1, 3 * GetGameSpeed()); // start timer loop, 3 seconds
//annoying fixes related to using left click to start the game
gameStarted = true;
cSkinner.SetAsPlayer();
cScroller.ChangeRoom(3, 30, -100);
#ifdef DEBUG
{
player.Say("Game is in DEBUG mode. Don't forget to disable this (in General Settings) before release!");
}
#endif
//display OS int (2 = Windows, 8 = Web)
//player.Say(String.Format("%d", System.OperatingSystem));
}
function room_Load()
{
//stupid fix
cScroller.y = -100;
aFire.Stop();
//aFire_Quiet.Stop();
/*
if (fireChannel)
{
fireChannel.Stop();
}*/
if (player.PreviousRoom == 4) //if skinner just came from the kitchen, the door should be open
{
oKitchenDoor.Visible = true;
}
}
function room_AfterFadeIn()
{
if (player.PreviousRoom == 4) //if skinner just came from the kitchen, the door should quickly close
{
oKitchenDoor.Visible = false;
}
}
function hFrontDoor_AnyClick()
{
if (Verbs.MovePlayer(45, 107)) { //get as close to the coords as possible
player.FaceDirection(eDirectionLeft);
// Walk To (does nothing)
if(Verbs.UsedAction(eGA_WalkTo)) {
}
// Look At
else if(Verbs.UsedAction(eGA_LookAt)) {
GenericResponse(eResponse_Hmm);
}
// Open/Push/Pull/Use
else if(Verbs.UsedAction(eGA_Open) || Verbs.UsedAction(eGA_Push) || Verbs.UsedAction(eGA_Pull) || Verbs.UsedAction(eGA_Use)) {
if (ChalmersInHouse) {
GenericResponse(eResponse_WontLeave);
}
else
{
ChalmersInHouse = true;
StartCutscene(eSkipESCOrRightButton);
//hide the ui
gAction.Visible = false;
gMain.Visible = false;
mouse.Visible = false;
//disable Chalmer's timer
SetTimer(1, 0);
aOpendoor.Play();
oFrontDoor.Visible = true;
player.LockView(VSKINNER_PICKUP_MED);
player.Animate(eDirectionLeft, 4, eOnce, eBlock);
player.UnlockView();
player.Walk(54, 109, eBlock);
player.FaceCharacter(cChalmers, eBlock);
Wait(10);
cChalmers.x = 21;
cChalmers.y = 109;
cChalmers.FaceDirection(eDirectionRight);
Wait(20);
cChalmers.SayAt(0, 40, 165, "&1 Well Seymour, I made it...");
//Wait(2);
cChalmers.SayAt(0, 40, 160, "&2 Despite your directions.");
Wait(10);
player.SayAt(0, 40, 210, "&1 Ahhh, Superintendent Chalmers!");
Wait(10);
player.Say("&2 Welcome!");
Wait(20);
player.SayAt(0, 40, 200, "&3 I hope you're prepared for an unforgettable luncheon!");
Wait(15);
cChalmers.Say("&3 Nyeh.");
//cChalmers.Say("&3 Yeah.");
player.Walk(238, 120, eNoBlock, eAnywhere);
Wait(26); //important!! delay has to end with 6 or the walking speeds desync and create a nasty artifact when scrolling
cChalmers.Walk(130, 111, eBlock, eAnywhere);
cChalmers.Walk(126, 109, eBlock, eAnywhere);
cChalmers.Baseline = 5;
cChalmers.LockView(VCHALMERS_SIT);
oTableLeft.Visible = true;
cChalmers.Animate(0, 3, eOnce, eNoBlock);
player.Walk(238, 109, eBlock, eAnywhere);
oKitchenDoor.Visible = true;
player.LockView(VSKINNER_DOOR);
player.Animate(eDirectionRight, 4, eOnce, eBlock);
player.UnlockView();
aSwingdoor.Play();
//silently close the front door for later use
oFrontDoor.Visible = false;
Wait(10);
player.ChangeRoom(4, 24, 109, eDirectionRight);
oKitchenDoor.Visible = false;
//get chalmers ready for any future conversations
cChalmers.SpeechView = VCHALMERS_SIT_TALK;
cChalmers.ChangeView(VCHALMERS_SIT_IDLE);
cChalmers.UnlockView();
EndCutscene();
//unhide the ui
gAction.Visible = true;
gMain.Visible = true;
mouse.Visible = true;
}
}
// Pickup
else if(Verbs.UsedAction(eGA_PickUp)) {
GenericResponse(eResponse_Impossible);
}
// Close/Use With (UseInv)
else if(Verbs.UsedAction(eGA_Close) || Verbs.UsedAction(eGA_UseInv)) {
//debug shortcut to jump to the final scene
#ifdef DEBUG
//hide the ui
gAction.Visible = false;
gMain.Visible = false;
player.ChangeRoom(5);
#endif
#ifndef DEBUG
GenericResponse(eResponse_No);
#endif
}
// Talk To
else if(Verbs.UsedAction(eGA_TalkTo)) {
GenericResponse(eResponse_Talk);
}
// any other verb
else {
GenericResponse(eResponse_Uhh);
}
}
}
function hKitchenDoor_AnyClick()
{
if (Verbs.MovePlayer(234, 110)) { //get as close to the coords as possible
player.FaceDirection(eDirectionRight);
// Look At
if(Verbs.UsedAction(eGA_LookAt)) {
GenericResponse(eResponse_Hmm);
}
// Open/Push/Pull/Use/Walk To
else if(Verbs.UsedAction(eGA_Open) || Verbs.UsedAction(eGA_Push) || Verbs.UsedAction(eGA_Pull) || Verbs.UsedAction(eGA_Use)|| Verbs.UsedAction(eGA_WalkTo)) {
//if (!ChalmersInHouse) { //chalmers hasn't entered the house yet
// if(!Verbs.UsedAction(eGA_WalkTo)) //the player wasn't just trying to WALK to the door
// {
/// player.Say("&55 I'm right where I want to be."); //say a voiceline to indicate the door needs to be opened first
// }
//}
//else
//{
player.Walk(238, 109, eBlock, eAnywhere);
oKitchenDoor.Visible = true;
player.LockView(VSKINNER_DOOR);
player.Animate(eDirectionRight, 4, eOnce, eBlock);
player.UnlockView();
aSwingdoor.Play();
Wait(10);
player.ChangeRoom(4, 24, 109, eDirectionRight);
oKitchenDoor.Visible = false;
// }
}
// Pickup
else if(Verbs.UsedAction(eGA_PickUp)) {
GenericResponse(eResponse_Impossible);
}
// Close/Use With (UseInv)
else if(Verbs.UsedAction(eGA_Close) || Verbs.UsedAction(eGA_UseInv)) {
GenericResponse(eResponse_No);
}
// Talk To
else if(Verbs.UsedAction(eGA_TalkTo)) {
GenericResponse(eResponse_Talk);
}
// any other verb
else {
GenericResponse(eResponse_Uhh);
}
}
}
function room_RepExec()
{
if (IsTimerExpired(1)) {
aDoorbell.Play();
cChalmers.SayBackground("DING DONG");
SetTimer(1, (Random(3) + 7) * GetGameSpeed()); // restart timer, 7 to 10 seconds
}
}
function hFakeDoor_AnyClick()
{
if (Verbs.MovePlayer(78, 100)) {
// Walk To (does nothing)
if(Verbs.UsedAction(eGA_WalkTo)) {
}
// Look At
else if(Verbs.UsedAction(eGA_LookAt)) {
GenericResponse(eResponse_Hmm);
}
// Open/Push/Pull/Use
else if(Verbs.UsedAction(eGA_Open) || Verbs.UsedAction(eGA_Push) || Verbs.UsedAction(eGA_Pull) || Verbs.UsedAction(eGA_Use)) {
if (!ChalmersInHouse) { //chalmers hasn't entered the house yet
player.Say("&55 I'm right where I want to be."); //say a voiceline to indicate the door needs to be opened first
}
else
{
player.Say("&49 I'm afraid we're stuck here for the duration.");
iResponse_WontLeave_Selection = 1; //set it so we don't hear this line again straight away when cycling through "i dont want to leave" lines
}
}
// Pickup
else if(Verbs.UsedAction(eGA_PickUp)) {
GenericResponse(eResponse_Impossible);
}
// Close/Use With (UseInv)
else if(Verbs.UsedAction(eGA_Close) || Verbs.UsedAction(eGA_UseInv)) {
GenericResponse(eResponse_No);
}
// Talk To
else if(Verbs.UsedAction(eGA_TalkTo)) {
GenericResponse(eResponse_Talk);
}
// any other verb
else {
GenericResponse(eResponse_Uhh);
}
}
}
function hPainting_AnyClick()
{
if (Verbs.MovePlayer(167, 116)) {
// Walk To (does nothing)
if(Verbs.UsedAction(eGA_WalkTo)) {
}
// Look At
else if(Verbs.UsedAction(eGA_LookAt)) {
GenericResponse(eResponse_Hmm);
}
// Use/Push/Pull/Open/Close/Pickup/Use With (UseInv)
else if(Verbs.UsedAction(eGA_Push) || Verbs.UsedAction(eGA_Pull) || Verbs.UsedAction(eGA_Use) || Verbs.UsedAction(eGA_Open) || Verbs.UsedAction(eGA_Close) || Verbs.UsedAction(eGA_PickUp) || Verbs.UsedAction(eGA_UseInv)) {
GenericResponse(eResponse_No);
}
// Talk To
else if(Verbs.UsedAction(eGA_TalkTo)) {
GenericResponse(eResponse_Talk);
}
// any other verb
else {
GenericResponse(eResponse_Uhh);
}
}
}
function hLeftChair_AnyClick()
{
if (Verbs.MovePlayer(117, 114)) {
// Walk To (does nothing)
if(Verbs.UsedAction(eGA_WalkTo)) {
}
// Look At
else if(Verbs.UsedAction(eGA_LookAt)) {
GenericResponse(eResponse_Hmm);
}
// Use/Push/Pull/Open/Close/Pickup/Use With (UseInv)
else if(Verbs.UsedAction(eGA_Push) || Verbs.UsedAction(eGA_Pull) || Verbs.UsedAction(eGA_Use) || Verbs.UsedAction(eGA_Open) || Verbs.UsedAction(eGA_Close) || Verbs.UsedAction(eGA_PickUp) || Verbs.UsedAction(eGA_UseInv)) {
GenericResponse(eResponse_No);
}
// Talk To
else if(Verbs.UsedAction(eGA_TalkTo)) {
GenericResponse(eResponse_Talk);
}
// any other verb
else {
GenericResponse(eResponse_Uhh);
}
}
}
function hRightChair_AnyClick()
{
if (Verbs.MovePlayer(217, 114)) {
// Walk To (does nothing)
if(Verbs.UsedAction(eGA_WalkTo)) {
}
// Look At
else if(Verbs.UsedAction(eGA_LookAt)) {
GenericResponse(eResponse_Hmm);
}
// Use/Push/Pull/Open/Close/Pickup/Use With (UseInv)
else if(Verbs.UsedAction(eGA_Push) || Verbs.UsedAction(eGA_Pull) || Verbs.UsedAction(eGA_Use) || Verbs.UsedAction(eGA_Open) || Verbs.UsedAction(eGA_Close) || Verbs.UsedAction(eGA_PickUp) || Verbs.UsedAction(eGA_UseInv)) {
GenericResponse(eResponse_No);
}
// Talk To
else if(Verbs.UsedAction(eGA_TalkTo)) {
GenericResponse(eResponse_Talk);
}
// any other verb
else {
GenericResponse(eResponse_Uhh);
}
}
}
function hTable_AnyClick()
{
//USE INV (check for this BEFORE any player movements, as it's an alternate position from the standard table position)
if(Verbs.UsedAction(eGA_UseInv)) {
if (player.ActiveInventory==iBurger) {
StartTableConversation();
}
}
else
{
if (Verbs.MovePlayer(165, 116)) {
// Walk To (does nothing)
if(Verbs.UsedAction(eGA_WalkTo)) {
}
// Look At
else if(Verbs.UsedAction(eGA_LookAt)) {
GenericResponse(eResponse_Hmm);
}
// Use/Push/Pull/Open/Close/Pickup
else if(Verbs.UsedAction(eGA_Push) || Verbs.UsedAction(eGA_Pull) || Verbs.UsedAction(eGA_Use) || Verbs.UsedAction(eGA_Open) || Verbs.UsedAction(eGA_Close) || Verbs.UsedAction(eGA_PickUp)) {
GenericResponse(eResponse_No);
}
// Talk To
else if(Verbs.UsedAction(eGA_TalkTo)) {
GenericResponse(eResponse_Talk);
}
// any other verb
else {
GenericResponse(eResponse_Uhh);
}
}
}
}