-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathAudio.gd
1194 lines (963 loc) · 28.7 KB
/
Audio.gd
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
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
extends AudioStreamPlayer
export var minus = -2
func _process(_delta):
volume_db = -(80 - ((Worldconfig.player.draw_distance - ((Worldconfig.player.position - get_owner().position).length()))/Worldconfig.player.draw_distance)*80) -minus
func not_zero(numba):
if numba == 0:
numba = 0.01
return numba
var which = 0
var skin = 0
###############################################################################
#RANDOM
const ambienceGDTs = preload("res://audio/ambience-gdt.mp3")
func ambienceGDT():
if !playing:
set_stream(ambienceGDTs)
play()
#RANDOM
###############################################################################
#FEET
const feetA1 = preload("res://audio/feet/feet_step_concrete1.wav")
const feetA2 = preload("res://audio/feet/feet_step_concrete2.wav")
const feetA3 = preload("res://audio/feet/feet_step_concrete3.wav")
const feetA4 = preload("res://audio/feet/feet_step_concrete4.wav")
const feetA5 = preload("res://audio/feet/feet_step_concrete5.wav")
const feetB1 = preload("res://audio/feet/feet_step_dirt1.wav")
const feetB2 = preload("res://audio/feet/feet_step_dirt2.wav")
const feetB3 = preload("res://audio/feet/feet_step_dirt3.wav")
func feet_step():
skin = get_owner().feet_terrain
if skin == 0:
which = (randi() % 5)
if which == 0:
set_stream(feetA1)
elif which == 1:
set_stream(feetA2)
elif which == 2:
set_stream(feetA3)
elif which == 3:
set_stream(feetA4)
else:#if which == 1:
set_stream(feetA5)
elif skin == 1:
which = (randi() % 3)
if which == 0:
set_stream(feetB1)
elif which == 1:
set_stream(feetB2)
else:
set_stream(feetB3)
play()
const feetC1 = preload("res://audio/feet/feet_jump1.wav")
const feetC2 = preload("res://audio/feet/feet_jump2.wav")
func feet_jump():
which = randi() % 2
if which == 0:
set_stream(feetC1)
else:
set_stream(feetC2)
play()
const feetD1 = preload("res://audio/feet/feet_land1.wav")
const feetD2 = preload("res://audio/feet/feet_land2.wav")
func feet_land():
which = randi() % 2
if which == 0:
set_stream(feetD1)
else:
set_stream(feetD2)
play()
#FEET
###############################################################################
#NPC oh boy here we go
const npcSCIA1 = preload("res://audio/npc/sci/npc_beg1.wav") #PLACEHOLDER 1
const npcSCIA2 = preload("res://audio/npc/sci/npc_beg2.wav")
const npcBARNEYA1 = preload("res://audio/npc/barney/npc_beg1.wav") #PLACEHOLDER 2
const npcBARNEYA2 = preload("res://audio/npc/barney/npc_beg2.wav")
const npc0A1 = preload("res://audio/npc/0/beg1.wav") #ME
const npc0A2 = preload("res://audio/npc/0/beg2.wav")
const npc0A3 = preload("res://audio/npc/0/beg3.wav")
const npc1A1 = preload("res://audio/npc/1/beg1.wav") #MOM
const npc1A2 = preload("res://audio/npc/1/beg2.wav")
const npc1A3 = preload("res://audio/npc/1/beg3.wav")
const npc1A4 = preload("res://audio/npc/1/beg4.wav")
const npc1A5 = preload("res://audio/npc/1/beg5.wav")
const npc1A6 = preload("res://audio/npc/1/beg6.wav")
const npc2A = preload("res://audio/npc/2/beg1.wav") #RODS
const npc3A1 = preload("res://audio/npc/3/beg1.wav") #DAD
const npc3A2 = preload("res://audio/npc/3/beg2.wav")
const npc3A3 = preload("res://audio/npc/3/beg3.wav")
const npc3A4 = preload("res://audio/npc/3/beg4.wav")
const npc4A1 = preload("res://audio/npc/4/beg1.wav") #LOKI
const npc4A2 = preload("res://audio/npc/4/beg2.wav")
func npc_beg():
#if !playing: #low priority
skin = get_owner().skin
if skin == 0: #ME
which = (randi() % 3)
if which == 0:
set_stream(npc0A1)
elif which == 1:
set_stream(npc0A2)
else:#if which == 2:
set_stream(npc0A3)
elif skin == 1: #MOM
which = (randi() % 6)
if which == 0:
set_stream(npc1A1)
elif which == 1:
set_stream(npc1A2)
elif which == 2:
set_stream(npc1A3)
elif which == 3:
set_stream(npc1A4)
elif which == 4:
set_stream(npc1A5)
else:#
set_stream(npc1A6)
elif skin == 2: #RODS
which = randi() % 3
if which == 0:
set_stream(npc2A)
elif which == 1:
set_stream(npc2E) #scream
else:
set_stream(npc2J2) #pain2
elif skin == 3: #DAD
which = randi() % 4
if which == 0:
set_stream(npc3A1)
elif which == 1:
set_stream(npc3A2)
elif which == 2:
set_stream(npc3A3)
else:
set_stream(npc3A4)
elif skin == 4: #LOKI
which = randi() % 2
if which == 0:
set_stream(npc4A1)
else:
set_stream(npc4A2)
elif skin == 5:
which = (randi() % 2)
if which == 0:
set_stream(npcSCIA1)
else:#if which == 1:
set_stream(npcSCIA2)
else:
which = (randi() % 2)
if which == 0:
set_stream(npcBARNEYA1)
else:#if which == 1:
set_stream(npcBARNEYA2)
play()
const npcSCIB = preload("res://audio/npc/sci/npc_breathe.wav")
const npcBARNEYB = preload("res://audio/npc/barney/npc_breathe.wav")
const npc0B1 = preload("res://audio/npc/0/breathe1.wav")
const npc0B2 = preload("res://audio/npc/0/breathe2.wav")
const npc1B = preload("res://audio/npc/1/breathe1.wav")
const npc2B = preload("res://audio/npc/2/breathe.wav")
const npc3B1 = preload("res://audio/npc/3/breathe1.wav")
const npc3B2 = preload("res://audio/npc/3/breathe2.wav")
const npc3B3 = preload("res://audio/npc/3/breathe3.wav")
const npc4B1 = preload("res://audio/npc/4/breathe1.wav")
const npc4B2 = preload("res://audio/npc/4/breathe2.wav")
func npc_breathe():
skin = get_owner().skin
if skin == 0: #ME
which = (randi() % 2)
if which == 0:
set_stream(npc0B1)
else:
set_stream(npc0B2)
elif skin == 1: #MOM
set_stream(npc1B)
elif skin == 2: #RODS
set_stream(npc2B)
elif skin == 3: #DAD
which = (randi() % 3)
if which == 0:
set_stream(npc3B1)
elif which == 1:
set_stream(npc3B2)
else:
set_stream(npc3B3)
elif skin == 4: #LOKI
which = randi() % 2
if which == 0:
set_stream(npc4B1)
else:
set_stream(npc4B2)
elif skin == 5:
set_stream(npcSCIB)
else:
set_stream(npcBARNEYB)
play()
const npcSCIC1 = preload("res://audio/npc/sci/npc_bump1.wav")
const npcSCIC2 = preload("res://audio/npc/sci/npc_bump2.wav")
const npcBARNEYC1 = preload("res://audio/npc/barney/npc_bump1.wav")
const npcBARNEYC2 = preload("res://audio/npc/barney/npc_bump2.wav")
const npc0C1 = preload("res://audio/npc/0/bump1.wav")
const npc0C2 = preload("res://audio/npc/0/bump2.wav")
const npc0C3 = preload("res://audio/npc/0/bump3.wav")
const npc0C4 = preload("res://audio/npc/0/bump4.wav")
const npc0C5 = preload("res://audio/npc/0/bump5.wav")
const npc0C6 = preload("res://audio/npc/0/bump6.wav")
const npc0C7 = preload("res://audio/npc/0/bump7.wav")
const npc1C1 = preload("res://audio/npc/1/bump1.wav")
const npc1C2 = preload("res://audio/npc/1/bump2.wav")
const npc1C3 = preload("res://audio/npc/1/bump3.wav")
const npc2C1 = preload("res://audio/npc/2/bump1.wav")
const npc2C2 = preload("res://audio/npc/2/bump2.wav")
const npc3C1 = preload("res://audio/npc/3/bump1.wav")
const npc3C2 = preload("res://audio/npc/3/bump2.wav")
const npc3C3 = preload("res://audio/npc/3/bump3.wav")
const npc3C4 = preload("res://audio/npc/3/bump4.wav")
const npc3C5 = preload("res://audio/npc/3/bump5.wav")
const npc3C6 = preload("res://audio/npc/3/bump6.wav")
const npc4C1 = preload("res://audio/npc/4/bump1.wav")
const npc4C2 = preload("res://audio/npc/4/bump2.wav")
const npc4C3 = preload("res://audio/npc/4/bump3.wav")
func npc_bump():
if !playing: #low priority
skin = get_owner().skin
if skin == 0: #ME
which = (randi() % 7)
if which == 0:
set_stream(npc0C1)
elif which == 1:
set_stream(npc0C2)
elif which == 2:
set_stream(npc0C3)
elif which == 3:
set_stream(npc0C4)
elif which == 4:
set_stream(npc0C5)
elif which == 5:
set_stream(npc0C6)
else:#if which == 6:
set_stream(npc0C7)
elif skin == 1: #MOM
which = (randi() % 3)
if which == 0:
set_stream(npc1C1)
elif which == 1:
set_stream(npc1C2)
else:
set_stream(npc1C3)
elif skin == 2: #RODS
which = randi() % 2
if which == 0:
set_stream(npc2C1)
else:
set_stream(npc2C2)
elif skin == 3: #DAD
which = (randi() % 5)
if which == 0:
set_stream(npc3C1)
elif which == 1:
set_stream(npc3C2)
elif which == 2:
set_stream(npc3C3)
elif which == 3:
set_stream(npc3C4)
elif which == 4:
set_stream(npc3C5)
else:
set_stream(npc3C6)
elif skin == 4: #LOKI
which = randi() % 3
if which == 0:
set_stream(npc4C1)
elif which == 1:
set_stream(npc4C2)
else:
set_stream(npc4C3)
elif skin == 5:
which = (randi() % 2)
if which == 0:
set_stream(npcSCIC1)
else:#if which == 1:
set_stream(npcSCIC2)
else:
which = (randi() % 2)
if which == 0:
set_stream(npcBARNEYC1)
else:#if which == 1:
set_stream(npcBARNEYC2)
play()
const npcSCID = preload("res://audio/npc/sci/npc_die.wav")
const npcBARNEYD = preload("res://audio/npc/barney/npc_die.wav")
const npc0D1 = preload("res://audio/npc/0/die1.wav")
const npc0D2 = preload("res://audio/npc/0/die2.wav")
const npc0D3 = preload("res://audio/npc/0/die3.wav")
const npc1D = preload("res://audio/npc/1/die.wav")
#const npc2D = preload("")
const npc3D1 = preload("res://audio/npc/3/die1.wav")
const npc3D2 = preload("res://audio/npc/3/die2.wav")
const npc3D3 = preload("res://audio/npc/3/die3.wav")
const npc3D4 = preload("res://audio/npc/3/die4.wav")
const npc4D = preload("res://audio/npc/4/die1.wav")
func npc_die():
skin = get_owner().skin
if skin == 0: #ME
which = (randi() % 3)
if which == 0:
set_stream(npc0D1)
elif which == 1:
set_stream(npc0D2)
else:
set_stream(npc0D3)
elif skin == 1: #MOM
set_stream(npc1D)
elif skin == 2: #RODS
set_stream(npc2C2) #bump2 sound
elif skin == 3: #DAD
which = (randi() % 4)
if which == 0:
set_stream(npc3D1)
elif which == 1:
set_stream(npc3D2)
elif which == 2:
set_stream(npc3D3)
else:
set_stream(npc3D4)
elif skin == 4:
set_stream(npc4D)
elif skin == 5:
set_stream(npcSCID)
else:
set_stream(npcBARNEYD)
play()
const npcSCIE1 = preload("res://audio/npc/sci/npc_scream1.wav")
const npcSCIE2 = preload("res://audio/npc/sci/npc_scream2.wav")
const npcBARNEYE1 = preload("res://audio/npc/sci/npc_scream1.wav")
const npcBARNEYE2 = preload("res://audio/npc/sci/npc_scream2.wav")
const npc0E1 = preload("res://audio/npc/0/scream1.wav")
const npc0E2 = preload("res://audio/npc/0/scream2.wav")
const npc0E3 = preload("res://audio/npc/0/scream3.wav")
const npc0E4 = preload("res://audio/npc/0/scream4.wav")
const npc0E5 = preload("res://audio/npc/0/scream5.wav")
const npc1E1 = preload("res://audio/npc/1/scream1.wav")
const npc1E2 = preload("res://audio/npc/1/scream2.wav")
const npc1E3 = preload("res://audio/npc/1/scream3.wav")
const npc1E4 = preload("res://audio/npc/1/scream4.wav")
const npc2E = preload("res://audio/npc/2/scream1.wav")
const npc3E1 = preload("res://audio/npc/3/scream1.wav")
const npc3E2 = preload("res://audio/npc/3/scream2.wav")
const npc3E3 = preload("res://audio/npc/3/scream3.wav")
const npc3E4 = preload("res://audio/npc/3/scream4.wav")
const npc4E1 = preload("res://audio/npc/4/scream1.wav")
const npc4E2 = preload("res://audio/npc/4/scream2.wav")
func npc_scream():
skin = get_owner().skin
if skin == 0: #ME
which = (randi() % 5)
if which == 0:
set_stream(npc0E1)
elif which == 1:
set_stream(npc0E2)
elif which == 2:
set_stream(npc0E3)
elif which == 3:
set_stream(npc0E4)
else:#if which == 4:
set_stream(npc0E5)
elif skin == 1: #MOM
which = (randi() % 4)
if which == 0:
set_stream(npc1E1)
elif which == 1:
set_stream(npc1E2)
elif which == 2:
set_stream(npc1E3)
else:
set_stream(npc1E4)
elif skin == 2: #RODS
which = randi() % 2
if which == 0:
set_stream(npc2E)
else:
set_stream(npc2J2) #pain2 sound
elif skin == 3: #DAD
which = (randi() % 4)
if which == 0:
set_stream(npc3E1)
elif which == 1:
set_stream(npc3E2)
elif which == 2:
set_stream(npc3E3)
else:
set_stream(npc3E4)
elif skin == 4: #LOKI
which = randi() % 2
if which == 0:
set_stream(npc4E1)
else:
set_stream(npc4E2)
elif skin == 5:
which = (randi() % 2)
if which == 0:
set_stream(npcSCIE1)
else:
set_stream(npcSCIE2)
else:
which = (randi() % 2)
if which == 0:
set_stream(npcBARNEYE1)
else:
set_stream(npcBARNEYE2)
play()
const npcSCIF1 = preload("res://audio/npc/sci/npc_talk1.wav")
const npcSCIF2 = preload("res://audio/npc/sci/npc_talk2.wav")
const npcBARNEYF1 = preload("res://audio/npc/barney/npc_talk1.wav")
const npcBARNEYF2 = preload("res://audio/npc/barney/npc_talk2.wav")
const npc0F1 = preload("res://audio/npc/0/talk1.wav")
const npc0F2 = preload("res://audio/npc/0/talk2.wav")
const npc0F3 = preload("res://audio/npc/0/talk3.wav")
const npc0F4 = preload("res://audio/npc/0/talk4.wav")
const npc1F1 = preload("res://audio/npc/1/talk1.wav")
const npc1F2 = preload("res://audio/npc/1/talk2.wav")
const npc1F3 = preload("res://audio/npc/1/talk3.wav")
const npc1F4 = preload("res://audio/npc/1/talk4.wav")
const npc1F5 = preload("res://audio/npc/1/talk5.wav")
const npc2F1 = preload("res://audio/npc/2/talk1.wav")
const npc2F2 = preload("res://audio/npc/2/talk2.wav")
const npc2F3 = preload("res://audio/npc/2/talk3.wav")
const npc3F1 = preload("res://audio/npc/3/talk1.wav")
const npc3F2 = preload("res://audio/npc/3/talk2.wav")
const npc3F3 = preload("res://audio/npc/3/talk3.wav")
const npc3F4 = preload("res://audio/npc/3/talk4.wav")
const npc3F5 = preload("res://audio/npc/3/talk5.wav")
const npc4F1 = preload("res://audio/npc/4/talk1.wav")
const npc4F2 = preload("res://audio/npc/4/talk2.wav")
const npc4F3 = preload("res://audio/npc/4/talk3.wav")
func npc_talk():
if !playing:
skin = get_owner().skin
if skin == 0: #ME
which = (randi() % 4)
if which == 0:
set_stream(npc0F1)
elif which == 1:
set_stream(npc0F2)
elif which == 2:
set_stream(npc0F3)
else:
set_stream(npc0F4)
elif skin == 1: #MOM
which = (randi() % 5)
if which == 0:
set_stream(npc1F1)
elif which == 1:
set_stream(npc1F2)
elif which == 2:
set_stream(npc1F3)
elif which == 3:
set_stream(npc1F4)
else:
set_stream(npc1F5)
elif skin == 2: #RODS
which = randi() % 3
if which == 0:
set_stream(npc2F1)
elif which == 1:
set_stream(npc2F2)
else:
set_stream(npc2F3)
elif skin == 3: #DAD
which = (randi() % 5)
if which == 0:
set_stream(npc3F1)
elif which == 1:
set_stream(npc3F2)
elif which == 2:
set_stream(npc3F3)
elif which == 3:
set_stream(npc3F4)
else:
set_stream(npc3F5)
elif skin == 4: #LOKI
which = randi() % 3
if which == 0:
set_stream(npc4F1)
elif which == 1:
set_stream(npc4F2)
else:
set_stream(npc4F3)
elif skin == 5:
which = (randi() % 2)
if which == 0:
set_stream(npcSCIF1)
else:#if which == 1:
set_stream(npcSCIF2)
else:
which = (randi() % 2)
if which == 0:
set_stream(npcBARNEYF1)
else:#if which == 1:
set_stream(npcBARNEYF2)
play()
const npcSCIG1 = preload("res://audio/npc/sci/npc_trashtalk1.wav")
const npcSCIG2 = preload("res://audio/npc/sci/npc_trashtalk2.wav")
const npcBARNEYG1 = preload("res://audio/npc/barney/npc_trashtalk1.wav")
const npcBARNEYG2 = preload("res://audio/npc/barney/npc_trashtalk2.wav")
const npc0G1 = preload("res://audio/npc/0/trashtalk1.wav")
const npc0G2 = preload("res://audio/npc/0/trashtalk2.wav")
const npc0G3 = preload("res://audio/npc/0/trashtalk3.wav")
const npc0G4 = preload("res://audio/npc/0/trashtalk4.wav")
const npc1G1 = preload("res://audio/npc/1/trashtalk1.wav")
const npc1G2 = preload("res://audio/npc/1/trashtalk2.wav")
const npc1G3 = preload("res://audio/npc/1/trashtalk3.wav")
const npc2G1 = preload("res://audio/npc/2/trashtalk1.wav")
const npc2G2 = preload("res://audio/npc/2/trashtalk2.wav")
const npc3G1 = preload("res://audio/npc/3/trashtalk1.wav")
const npc3G2 = preload("res://audio/npc/3/trashtalk2.wav")
const npc3G3 = preload("res://audio/npc/3/trashtalk3.wav")
const npc3G4 = preload("res://audio/npc/3/trashtalk4.wav")
const npc3G5 = preload("res://audio/npc/3/trashtalk5.wav")
const npc4G1 = preload("res://audio/npc/4/trashtalk1.wav")
const npc4G2 = preload("res://audio/npc/4/trashtalk2.wav")
func npc_trashtalk():
if !playing:
skin = get_owner().skin
if skin == 0: #ME
which = (randi() % 4)
if which == 0:
set_stream(npc0G1)
elif which == 1:
set_stream(npc0G2)
elif which == 2:
set_stream(npc0G3)
else:#
set_stream(npc0G4)
elif skin == 1: #MOM
which = (randi() % 3)
if which == 0:
set_stream(npc1G1)
elif which == 1:
set_stream(npc1G2)
else:#
set_stream(npc1G3)
elif skin == 2: #RODS
which = (randi() % 2)
if which == 0:
set_stream(npc2G1)
else:
set_stream(npc2G2)
elif skin == 3: #DAD
which = (randi() % 4)
if which == 0:
set_stream(npc3G1)
elif which == 1:
set_stream(npc3G2)
elif which == 2:
set_stream(npc3G3)
elif which == 3:
set_stream(npc3G4)
else:#
set_stream(npc3G5)
elif skin == 4: #LOKI
which = randi() % 2
if which == 0:
set_stream(npc4G1)
else:
set_stream(npc4G2)
elif skin == 5:
which = (randi() % 2)
if which == 0:
set_stream(npcSCIG1)
else:
set_stream(npcSCIG2)
else:
which = (randi() % 2)
if which == 0:
set_stream(npcBARNEYG1)
else:
set_stream(npcBARNEYG2)
play()
const npcSCIH1 = preload("res://audio/npc/sci/npc_treat1.wav")
const npcSCIH2 = preload("res://audio/npc/sci/npc_treat2.wav")
const npcBARNEYH1 = preload("res://audio/npc/barney/npc_treat1.wav")
const npcBARNEYH2 = preload("res://audio/npc/barney/npc_treat2.wav")
const npc0H1 = preload("res://audio/npc/0/treat1.wav")
const npc0H2 = preload("res://audio/npc/0/treat2.wav")
const npc0H3 = preload("res://audio/npc/0/treat3.wav")
const npc0H4 = preload("res://audio/npc/0/treat4.wav")
const npc0H5 = preload("res://audio/npc/0/treat5.wav")
const npc1H1 = preload("res://audio/npc/1/treat1.wav")
const npc1H2 = preload("res://audio/npc/1/treat2.wav")
const npc1H3 = preload("res://audio/npc/1/treat3.wav")
const npc1H4 = preload("res://audio/npc/1/treat4.wav")
const npc2H1 = preload("res://audio/npc/2/treat1.wav")
const npc2H2 = preload("res://audio/npc/2/treat2.wav")
const npc2H3 = preload("res://audio/npc/2/treat3.wav")
const npc3H1 = preload("res://audio/npc/3/treat1.wav")
const npc3H2 = preload("res://audio/npc/3/treat2.wav")
const npc3H3 = preload("res://audio/npc/3/treat3.wav")
const npc4H1 = preload("res://audio/npc/4/treat1.wav")
const npc4H2 = preload("res://audio/npc/4/treat2.wav")
func npc_treat():
if !playing:
skin = get_owner().skin
if skin == 0: #ME
which = (randi() % 5)
if which == 0:
set_stream(npc0H1)
elif which == 1:
set_stream(npc0H2)
elif which == 2:
set_stream(npc0H3)
elif which == 3:
set_stream(npc0H4)
else:#if which == 2:
set_stream(npc0H5)
elif skin == 1: #MOM
which = (randi() % 4)
if which == 0:
set_stream(npc1H1)
elif which == 1:
set_stream(npc1H2)
elif which == 2:
set_stream(npc1H3)
else:
set_stream(npc1H4)
elif skin == 2: #RODS
which = (randi() % 3)
if which == 0:
set_stream(npc2H1)
elif which == 1:
set_stream(npc2H2)
else:
set_stream(npc2H3)
elif skin == 3: #DAD
which = (randi() % 3)
if which == 0:
set_stream(npc3H1)
elif which == 1:
set_stream(npc3H2)
else:
set_stream(npc3H3)
elif skin == 4: #LOKI
which = randi() % 2
if which == 0:
set_stream(npc4H1)
else:
set_stream(npc4H2)
elif skin == 5:
which = (randi() % 2)
if which == 0:
set_stream(npcSCIH1)
else:#if which == 1:
set_stream(npcSCIH2)
else:
which = (randi() % 2)
if which == 0:
set_stream(npcSCIH1)
else:#if which == 1:
set_stream(npcSCIH2)
play()
const npcI1 = preload("res://audio/npc/npc_fall1.wav")
const npcI2 = preload("res://audio/npc/npc_fall2.wav")
func npc_fall():
which = (randi() % 2)
if which == 0:
set_stream(npcI1)
else:#if which == 1:
set_stream(npcI2)
play()
const npcSCIJ1 = preload("res://audio/npc/sci/npc_pain1.wav")
const npcSCIJ2 = preload("res://audio/npc/sci/npc_pain2.wav")
const npcBARNEYJ1 = preload("res://audio/npc/barney/npc_pain1.wav")
const npcBARNEYJ2 = preload("res://audio/npc/barney/npc_pain2.wav")
const npc0J1 = preload("res://audio/npc/0/pain1.wav")
const npc0J2 = preload("res://audio/npc/0/pain2.wav")
const npc0J3 = preload("res://audio/npc/0/pain3.wav")
const npc0J4 = preload("res://audio/npc/0/pain4.wav")
const npc0J5 = preload("res://audio/npc/0/pain5.wav")
const npc1J1 = preload("res://audio/npc/1/pain1.wav")
const npc1J2 = preload("res://audio/npc/1/pain2.wav")
const npc1J3 = preload("res://audio/npc/1/pain3.wav")
const npc2J1 = preload("res://audio/npc/2/pain1.wav")
const npc2J2 = preload("res://audio/npc/2/pain2.wav")
const npc2J3 = preload("res://audio/npc/2/pain3.wav")
const npc2J4 = preload("res://audio/npc/2/pain4.wav")
const npc3J1 = preload("res://audio/npc/3/pain1.wav")
const npc3J2 = preload("res://audio/npc/3/pain2.wav")
const npc3J3 = preload("res://audio/npc/3/pain3.wav")
const npc3J4 = preload("res://audio/npc/3/pain4.wav")
const npc3J5 = preload("res://audio/npc/3/pain5.wav")
const npc3J6 = preload("res://audio/npc/3/pain6.wav")
const npc4J1 = preload("res://audio/npc/4/pain1.wav")
const npc4J2 = preload("res://audio/npc/4/pain2.wav")
func npc_pain():
skin = get_owner().skin
if skin == 0: #ME
which = (randi() % 5)
if which == 0:
set_stream(npc0J1)
elif which == 1:
set_stream(npc0J2)
elif which == 2:
set_stream(npc0J3)
elif which == 3:
set_stream(npc0J4)
else:
set_stream(npc0J5)
elif skin == 1: #MOM
which = (randi() % 3)
if which == 0:
set_stream(npc1J1)
elif which == 1:
set_stream(npc1J2)
else:
set_stream(npc1J3)
elif skin == 2: #RODS
which = (randi() % 4)
if which == 0:
set_stream(npc2J1)
elif which == 1:
set_stream(npc2J2)
elif which == 2:
set_stream(npc2J3)
else:
set_stream(npc2J4)
elif skin == 3: #DAD
which = (randi() % 6)
if which == 0:
set_stream(npc3J1)
elif which == 1:
set_stream(npc3J2)
elif which == 2:
set_stream(npc3J3)
elif which == 3:
set_stream(npc3J4)
elif which == 4:
set_stream(npc3J5)
else:
set_stream(npc3J6)
elif skin == 4: #LOKI
which = randi() % 2
if which == 0:
set_stream(npc4J1)
else:
set_stream(npc4J2)
elif skin == 5:
which = (randi() % 2)
if which == 0:
set_stream(npcSCIJ1)
else:#if which == 1:
set_stream(npcSCIJ2)
else:
which = (randi() % 2)
if which == 0:
set_stream(npcBARNEYJ1)
else:#if which == 1:
set_stream(npcBARNEYJ2)
play()
#NPC
###############################################################################
#CAR
const carA1 = preload("res://audio/car/car_bump1.wav")
const carA2 = preload("res://audio/car/car_bump1.wav")
func car_bump():
if !playing:
which = (randi() % 2)
if which == 0:
set_stream(carA1)
else:#if which == 1:
set_stream(carA2)
play()
const carB1 = preload("res://audio/car/car_crash1.wav")
const carB2 = preload("res://audio/car/car_crash2.wav")
const carB3 = preload("res://audio/car/car_crash3.wav")
var crashcheck = [carB1,carB2,carB3]
func car_crash():
which = (randi() % 3)
if which == 0:
set_stream(carB1)
elif which == 1:
set_stream(carB3)
else:#if which == 1:
set_stream(carB2)
play()
const carC = preload("res://audio/car/car_tire_skid.wav")
func car_tire_skid():
if !playing:
set_stream(carC)
play()
const carD = preload("res://audio/car/police_siren.wav")
func police_siren():
if !playing:
set_stream(carD)
play()
const car0E = preload("res://audio/car/TD3/car_engine_loop.wav")
const car1E = preload("res://audio/car/ecosport/car_engine_loop.wav")
const car2E = preload("res://audio/car/enduro/car_engine_loop.wav")
#const car1E = preload("res://audio/car/police_siren.wav")
func car_engine_loop():