intro_score_fade
On this page
R10. Directed-opening helper sources
a.rotation.y = a_end
b.rotation.y = b_end
return trueFades the opening score/soundscape instead of cutting it abruptly.
func run(_context: Dictionary = {}) -> Variant:
var score_player: AudioStreamPlayer = Runtime.media_manager.sound_players.get("opening")
if is_instance_valid(score_player):
var fade: Tween = Runtime.create_tween()
fade.tween_property(score_player,"volume_db",-40.0,3.0)
return trueintro_voice_mix#
Sets the opening voice mix for intelligible dialogue.
func run(_context: Dictionary = {}) -> Variant:
var score_player: AudioStreamPlayer = Runtime.media_manager.sound_players.get("opening")
if is_instance_valid(score_player):
score_player.volume_db = -16.0
return trueintro_handshake#
Moves the actors to nearby marks, starts compatible gestures, tests hand attach-point contact, briefly links the hands, then detaches safely.
func active(generation: int) -> bool:
return Runtime.runtime_generation == generation and Runtime.cutscene_runner.running and
Runtime.cutscene_runner.active_cutscene_id == "opening" and not
Runtime.cutscene_runner.skip_requestedfunc run(_context: Dictionary = {}) -> Variant:
var generation: int = Runtime.runtime_generation
var ivo: AdventureActor = Runtime.entity_nodes.get("ada") as AdventureActor
var elias: AdventureActor = Runtime.entity_nodes.get("elias") as AdventureActor
if ivo == null or elias == null: return false
var direction: Vector3 = (elias.global_position-ivo.global_position).normalized()
var center: Vector3 = (ivo.global_position+elias.global_position)*0.5
var ivo_mark: Vector3 = center-direction*0.3275
var elias_mark: Vector3 = center+direction*0.3275
Runtime.set_meta("clockmaker_handshake_phase", "approach")
Runtime.move_entity_to("ada", ivo_mark, 0.85, 0.005)
Runtime.move_entity_to("elias", elias_mark, 0.85, 0.005)
var seconds: float = 0.0
while seconds < 1.05 and active(generation):
await Runtime.get_tree().process_frame
seconds += Runtime.get_process_delta_time()
if not active(generation): return false
ivo.stop_moving()
elias.stop_moving()
var ivo_start: Vector3 = ivo.global_position
var elias_start: Vector3 = elias.global_position
# Settle the final navigation tolerance over several frames, never snap bodies
# into a hand socket from across the room.
if ivo_start.distance_to(ivo_mark) > 0.15 or elias_start.distance_to(elias_mark) > 0.15:
Runtime.log_message("Handshake approach could not reach its marks.")
return false
seconds = 0.0
while seconds < 0.20 and active(generation):
var fraction: float = smoothstep(0.0, 0.20, seconds)