Skip to reading
The Letter Exchange: Advanced Character Animation Workshop

Call the wave from BASIC

Edition 0.86.5.0

Fifteen-page standalone workshop for the Animation-Performance-Workshop.pca3d example included with Studio. Related chapters are also appended to the revised manuals. The example project is not an extra download in this documentation update; platform checks retain the scope stated on page 10.

Download PDFView PDF page
On this page

PCA 3D ADVENTURE STUDIO / SCRIPTING

Create a BASIC 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
OPTION PCA3D BASIC 1.0
FUNCTION Checked()
    DIM args = {"actorId":"player","layerId":"gesture","stateId":"wave"}
    RETURN ActionResult("SetAnimationLayer", args)
END FUNCTION

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.

Page 14 of 15Permalink
Go to page