Skip to reading
PCA Script Programming

38. Cameras, effects and clean restoration

Edition 0.86.4.1 HF1

0.86.4.1 Hotfix 1 edition. Earlier lessons and screenshots retain their original version context; revised references and supplements describe the newer behavior.

Download PDFView PDF page
Code example
function run()
    activate_camera({"cameraId": "wide", "duration": 0.8, "wait": true})
    let blur = {}
    blur["strength"] = 0.2
    blur["duration"] = 0.5
    blur["includeGUI"] = false
    blur["wait"] = true
    zoom_blur(blur)
end

Activate Camera uses an authored camera, including its configured blend behavior when duration is -1. Use an explicit positive duration for a predictable test. Camera property configuration and selecting the active view are different operations.

Zoom Blur suits a brief shock, impact or attention beat. A small strength and short duration are easier to read than a permanent blur. Use screen shader/effect actions for a full-screen treatment and region/object properties for local presentation; they are different scopes.

Before changing an ongoing effect, read/store the original setting if the player must return to it. Restore input locks, cursor visibility, camera follow and temporary effects on normal completion and cancellation. For many cinematic beats, author the sequence as a cutscene and call it from PCA.

A field in the reference is not a promise that every renderer implements the same effect. Confirm the appearance in the render mode and target build your players will use. Material shine is not automatically a dynamic mirror of the character.

Page 46 of 357Permalink
Go to page