Skip to content
This repository was archived by the owner on May 3, 2026. It is now read-only.

Commit 79b48fb

Browse files
authored
Merge pull request #19 from Project-Collapse-Studios/psc-dev
add: Automatic mic enabling/disabling for comp_choreo_sceneset
2 parents 3445320 + 24794b7 commit 79b48fb

2 files changed

Lines changed: 24 additions & 2 deletions

File tree

fgd/point/comp/comp_choreo_sceneset.fgd

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,14 @@
66
= comp_choreo_sceneset:
77
"Chains a set of choreographed scenes together."
88
[
9-
play_dings[P2](boolean): "Play Dings" : 1 : "Play the Aperture blip sounds at the start and end."
10-
delay(float): "Delay between each" : "0.1" : "Add a delay between each scene."
9+
play_dings[P2](boolean): "Play Dings" : 0 : "Play the Aperture blip sounds at the start and end."
10+
delay(float): "Delay between each" : "0.25" : "Add a delay between each scene."
1111
only_once(boolean): "Clean up after starting" : 1 : "If set, Kill choreo scenes after starting so they only play once." +
1212
"If set, the Cancel input will not work properly."
1313

14+
enable_microphone(boolean): "Enable Microphone" : 0 : "For unspatialized dialogue, enable the microphone to transmit audio directly to the player."
15+
microphone_name(target_destination): "Microphone Name" : "@ACTOR_MICROPHONE" : "The microphone to use if Enable Microphone is set to true."
16+
1417
busyactor[engine](integer) : "If an Actor is talking..." : 1 : "What to do if an actor this scene needs is already talking when this scene is told to start."
1518
busyactor(choices) : "If an Actor is talking..." : 1 : "What to do if an actor this scene needs is already talking when this scene is told to start." =
1619
[

transforms/sceneset.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ def sceneset(ctx: Context):
3333
delay = conv_float(ent['delay'], 0.1)
3434
only_once = conv_bool(ent['only_once'])
3535

36+
enable_mic = conv_bool(ent["enable_microphone", False])
37+
mic_name = ent["microphone_name", "@ACTOR_MICROPHONE"]
38+
3639
ent.remove()
3740

3841
scene_ents: List[Entity] = []
@@ -49,6 +52,7 @@ def sceneset(ctx: Context):
4952
origin=ent['origin'],
5053
scenefile=scene,
5154
)
55+
5256
scene_ents.append(part)
5357
if i + 1 < len(scenes):
5458
part.add_out(Output(
@@ -65,6 +69,21 @@ def sceneset(ctx: Context):
6569
Output('OnCompletion', '!self', 'Kill'),
6670
)
6771

72+
if enable_mic:
73+
scene_ents[0].add_out(Output(
74+
"OnStart",
75+
mic_name,
76+
"Enable",
77+
delay=0,
78+
))
79+
80+
scene_ents[-1].add_out(Output(
81+
"OnCompletion",
82+
mic_name,
83+
"Disable",
84+
delay=0,
85+
))
86+
6887
for out in ent.outputs:
6988
if out.output.casefold() == 'onstart':
7089
scene_ents[0].add_out(out)

0 commit comments

Comments
 (0)