Skip to reading
PCA Script Programming

Call the wave from PCA Script

Edition 0.86.5.0

0.86.5.0 tutorial edition with appended Advanced Character Animation workshop lessons. Earlier chapters, screenshots, PDF metadata and aggregate registry figures retain their stated edition context.

Download PDFView PDF page
On this page

PCA 3D ADVENTURE STUDIO / SCRIPTING

Create a PCA Script script record in the workshop. Add the function below, expose checked in Functions as Nodes, and invoke it for player during Test Scene. The same action also appears in the no-code action picker.

Code example
function checked()
    let args = {"actorId":"player","layerId":"gesture","stateId":"wave"}
    return action_result("SetAnimationLayer", args)
end

Read the checked result#

On success, ok is true. The result dictionary holds the handleId for this request. Keep that handle if another action will stop the layer later. In Debug & Profile, check the actor’s gesture layer. The state should read wave.

Try the failure case#

Change the state ID to absent and run the function again. The action returns a checked missing-clip failure. Give the state its original wave ID before saving your project.

ADVANCED CHARACTER ANIMATION / 0.86.5.0

Page 365 of 366Permalink
Go to page