28. Movement, animation and concurrent work
function run()
player walks to archive_door
player faces archive_door
play player animation "nod"
wait until player animation ends
endWalking uses navigation and approach settings; moving/teleporting is a different operation. An imported animation name must match a clip or configured state. Starting playback is not the same as waiting for it to finish. A looping idle clip never naturally ends, so the last wait above is suitable only for a finite clip.
function pan_notice()
camera_shake({"duration": 0.3, "power": 0.1})
log("Camera beat finished.")
endfunction run()
parallel
pan_notice()
show_message({"text": "The machine wakes.", "duration": 2})
end
log("Both branches finished.")
endEach immediate instruction in parallel is a branch. They start together, and the enclosing block waits for all branches. Wrap a sequence in a function when one branch needs several ordered steps. Parallel branches share local containers; avoid having both branches write the same state.
Readable start commands offer non-blocking versions of supported adventure actions. They are not a universal “make any function asynchronous” keyword. For staged camera, speech and animation sequences with many timings, the Cutscene Designer remains useful.
