Skip to reading
Cameras, Lighting & Rendering

32 Camera scripts in all four languages

Edition 0.86.4.3

0.86.4.3 edition with revised lessons, updated cross-references and new cinematic/camera-safety supplements. Earlier examples, screenshots and registry figures retain their stated edition context.

Download PDFView PDF page

All four scripting languages use the same action properties. These examples set the targets and blend to an existing conversation camera. Put the code in the language’s normal script record and call the script from an event.

Code example
# GDScript
func run(_context: Dictionary = {}) -> Variant:
    await SetCameraTargets({
        "cameraId":"conversation",
        "targetId":"player", "targetIds":"elias"
    })
    return await ActivateCamera({
        "cameraId":"conversation",
        "duration":1.2, "wait":true
    })
Code example
function run()
    SetCameraTargets({"cameraId":"conversation","targetId":"player","targetIds":"elias"})
    ActivateCamera({"cameraId":"conversation","duration":1.2,"wait":true})
end

The second example is PCA Script. Replace IDs with your own. A display label such as Conversation (conversation) is not the ID string to paste into code. Use conversation.

Page 38 of 109Permalink
Go to page