turn_three
On this page
R10. Directed-opening helper sources
Checks numeral III against the winding sequence and advances or resets dial.
func run(_context: Dictionary = {}) -> Variant:
var sequence: Array = [3, 1, 2]
var step: int = int(Runtime.variables.get("dial", 0))
if 3 != sequence[clampi(step, 0, 2)]:
await SetVariable({"name":"dial", "value":0})
await ShowMessage({"text":"A soft click. The winding sequence resets.", "duration":1.3})
return false
step += 1
await SetVariable({"name":"dial", "value":step})
if step == 3:
await HideGUI({"guiId":"dial"})
await RunVisualScript({"scriptId":"ring_bell"})
else:
await ShowMessage({"text":"A clean click. The next turn is ready.","duration":0.8})
return truehint#
Chooses a hint from the current puzzle flags, then shows it.
func run(_context: Dictionary = {}) -> Variant:
var v: Dictionary = Runtime.variables
var hint: String = "Wind the clock III, I, II. A wrong turn resets; you cannot get stuck."
if not v.get("key_taken",false): hint = "Open the workbench drawer in the workshop."
elif not v.get("archive_open",false): hint = "Select the archive key in Inventory, close Inventory,
then click the archive door."
elif not v.get("wheel_taken",false): hint = "Use the brass owl on the archive reading table."
elif not v.get("oil_taken",false): hint = "Pick up the small brass oil tin on the archive floor."
elif not v.get("wheel_fitted",false): hint = "Use the brass wheel from Inventory on the master clock
in the chamber."
elif not v.get("oiled",false): hint = "Use the bearing oil on the master clock."
await ShowMessage({"text":hint,"duration":4.5})
return trueintro_prepare#
Prepares the directed indoor opening, including initial actor and presentation state.
func run(_context: Dictionary = {}) -> Variant:
Runtime.change_game_setting("cinematic.letterbox", 0.105)
Runtime.project_data.settings.screenOverlay.enabled = false
Runtime._set_screen_overlay_visible(false)
Runtime.show_gui("opening_controls")
Runtime.teleport_entity("ada", Vector3(0,0,1.4))
Runtime.teleport_entity("elias", Vector3(2.1,0,-1.6))
for actor_id: String in ["ada", "elias"]:
Runtime.entity_nodes[actor_id].animation_state_records["walk"]["speed"] = 0.82
Runtime.entity_defs[actor_id]["character"]["walkSoundStride"] = 0.45
Runtime.set_character_state("ada", "listen")
Runtime.set_character_state("elias", "listen")
Runtime.face_position("ada", Vector3(0,0,-2))
Runtime.face_character("elias", "ada")
await Runtime.cutscene_runner.cutscene_finished
await Runtime.run_script("intro_handoff")
return true