-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPLOTS_State-Machine.txt
106 lines (103 loc) · 3.01 KB
/
PLOTS_State-Machine.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
@name State-Machine PLOTS
@inputs Go User1 User2 User3 CorrectReset IncorrectReset ManualSet
@outputs Status:string Light1:vector Light2:vector Light3:vector Spotlight1 Spotlight2 Spotlight3
@outputs EffectLight1 ThrustLight1 EffectLight2 ThrustLight2
@outputs TextDisplay:string FGColour:vector BGColour:vector
@outputs MainSpeakersSFX:string MainSpeakersPlay MainSpeakersStop
@outputs SpeakerSFX:string Speaker1Play Speaker1Stop Speaker2Play Speaker2Stop Speaker3Play Speaker3Stop
@persist STATE:string GoReset CurFlashTime FlashSwitch CurSpeakersTime
@persist User1Name:string User2Name:string User3Name:string User1Disable User2Disable User3Disable CurUser
@trigger all
# # # # # # # # # # # # # #
# STATE VALUES
# ---
# 00 = Idle
# 01 = Welcome
# 02 = Tile-Reveal Intro
# 03 = Category Reveal
#
# 04 = In-game, Standby
# 05 = Show Question
# 06 = Allow Buzzers
# 07 = Buzzed In
#
# 08 = Daily Double Alert
# 09 = Daily Double Show Question
# 10 = Daily Double Allow Buzzer
#
# 11 = Final Jeopardy Intro
# 12 = Final Jeopardy Show Question
# 13 = Final Jeopardy Answering
# # # # # # # # # # # # # #
#INIT
interval(100)
if(first()) {
STATE = "00"
Light1 = vec(40,40,40)
Light2 = vec(40,40,40)
Light3 = vec(40,40,40)
Spotlight1 = 0.25
Spotlight2 = 0.25
Spotlight3 = 0.25
User1Name = "User1"
User2Name = "User2"
User3Name = "User3"
MainSpeakerSFX = ""
SpeakerSFX = "hl1/fvox/bell.wav"
TextDisplay = "Standby"
FGColour = vec(130,130,155)
BGColour = vec(6,12,60)
}
Users = array(User1,User2,User3)
UsersDisable = array(User1Disable,User2Disable,User3Disable)
if(STATE == "00") { # Idle
if(Go) {
STATE = "01"
}
Status = "00 - Idle"
} elseif(STATE == "01") { # Welcome
Spotlight1 = 1
Spotlight2 = 1
Spotlight3 = 1
EffectLight1 = 3
ThrustLight1 = 1
EffectLight2 = 3
ThrustLight2 = 1
TextDisplay = "JEOPARDY"
FGColour = vec(230,230,255)
BGColour = vec(6,12,140)
Status = "01 - Welcome"
if(!Go) {
GoReset = 1
} elseif(Go & GoReset) {
STATE = "02"
}
Status = "01 - Welcome"
} elseif(STATE == "02") { # Tile-Reveal Intro
if(!Go) {
GoReset = 0
}
Status = "02 - Tile-Reveal Intro"
} elseif(STATE == "03") { # Category Reveal
Status = ""
} elseif(STATE == "04") { # In-game, Standby
Status = ""
} elseif(STATE == "05") { # Show Question
Status = ""
} elseif(STATE == "06") { # Allow Buzzers
Status = ""
} elseif(STATE == "07") { # Buzzed In
Status = ""
} elseif(STATE == "08") { # Daily Double Alert
Status = ""
} elseif(STATE == "09") { # Daily Double Show Question
Status = ""
} elseif(STATE == "10") { # Daily Double Allow Buzzer
Status = ""
} elseif(STATE == "11") { # Final Jeopardy Intro
Status = ""
} elseif(STATE == "12") { # Final Jeopardy Show Question
Status = ""
} elseif(STATE == "13") { # Final Jeopardy Answering
Status = ""
}