-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPLOTS.txt
146 lines (137 loc) · 3.66 KB
/
PLOTS.txt
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
@name PLOTS
@inputs User1 User2 User3 CorrectReset IncorrectReset
@outputs Light1:vector Light2:vector Light3:vector Spotlight1 Spotlight2 Spotlight3
@outputs TextDisplay:string FGColour:vector BGColour:vector
@outputs MainSpeakersSFX:string MainSpeakersPlay MainSpeakersStop
@outputs SpeakerSFX:string Speaker1Play Speaker1Stop Speaker2Play Speaker2Stop Speaker3Play Speaker3Stop
@persist Triggered Flash CurFlashTime FlashSwitch CurSpeakersTime
@persist User1Name:string User2Name:string User3Name:string User1Disable User2Disable User3Disable CurUser
@trigger all
# # # # # # # # # # #
# To-do
# ---
# 5-second buzz in
# Disable buzz-in during Incorrect
# Questions Random-Appear Intro
# Category Show
# Questions Show, Eliminate
# Questions Value
# User Scores
# Manual Score Adjust
# Daily Double
# 2nd Question Round
# Final Jeopardy
# Celebrate
#
# Get music, sfx
# # # # # # # # # # #
interval(200)
#INIT
if(first()) {
Light1 = vec(40,40,40)
Light2 = vec(40,40,40)
Light3 = vec(40,40,40)
Spotlight1 = 1
Spotlight2 = 1
Spotlight3 = 1
User1Name = "User1"
User2Name = "User2"
User3Name = "User3"
SpeakerSFX = "hl1/fvox/bell.wav"
}
Users = array(User1,User2,User3)
UsersDisable = array(User1Disable,User2Disable,User3Disable)
MainSpeakersPlay = 0
#Flash
if(curtime() < CurFlashTime + 2.5) {
if(FlashSwitch) {
FGColour = vec(180,230,180)
BGColour = vec(6,12,90)
} else {
FGColour = vec(230,230,255)
BGColour = vec(6,12,140)
}
FlashSwitch = !FlashSwitch
} else {
FGColour = vec(230,230,255)
BGColour = vec(6,12,140)
}
#Reset
if((CorrectReset | IncorrectReset) & Triggered) {
Light1 = vec(40,40,40)
Light2 = vec(40,40,40)
Light3 = vec(40,40,40)
Spotlight1 = 1
Spotlight2 = 1
Spotlight3 = 1
CurFlashTime = curtime()
Triggered = 0
if(CorrectReset) {
MainSpeakersSFX = "buttons/bell1.wav"
TextDisplay = "CORRECT!"
User1Disable = 0
User2Disable = 0
User3Disable = 0
} else {
MainSpeakersSFX = "buttons/weapon_cant_buy.wav"
TextDisplay = "INCORRECT!"
if(CurUser == 1) {
User1Disable = 1
} elseif(CurUser == 2) {
User2Disable = 1
} elseif(CurUser == 3) {
User3Disable = 1
}
}
MainSpeakersPlay = 1
MainSpeakersStop = 0
CurSpeakersTime = curtime()
Speaker1Play = 0
Speaker2Play = 0
Speaker3Play = 0
Speaker1Stop = 1
Speaker2Stop = 1
Speaker3Stop = 1
CurTextTime = curtime()
#User buzzed in
} elseif((Users:sum() != 0) & !Triggered) {
Triggered = 1
if(User1 & !User1Disable) {
Light1 = vec(180,180,180)
Speaker1Play = 1
Speaker1Stop = 0
Spotlight1 = 2
Spotlight2 = 0
Spotlight3 = 0
CurUser = 1
TextDisplay = User1Name + " has buzzed in!"
} elseif(User2 & !User2Disable) {
Light2 = vec(180,180,180)
Speaker2Play = 1
Speaker2Stop = 0
Spotlight1 = 0
Spotlight2 = 2
Spotlight3 = 0
CurUser = 2
TextDisplay = User2Name + " has buzzed in!"
} elseif(User3 & !User3Disable) {
Light3 = vec(180,180,180)
Speaker3Play = 1
Speaker3Stop = 0
Spotlight1 = 0
Spotlight2 = 0
Spotlight3 = 2
CurUser = 3
TextDisplay = User3Name + " has buzzed in!"
}
}
#All Incorrect
if(UsersDisable:sum() == UsersDisable:count()) {
User1Disable = 0
User2Disable = 0
User3Disable = 0
}
#Speaker Timer
if(curtime() > CurSpeakersTime + 2) {
MainSpeakersStop = !MainSpeakersPlay
}