Skip to reading
Action Lists & Events

React when the view becomes obstructed

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
PCA 3D ADVENTURE STUDIO  /  ACTION LISTS & EVENTS                                       0.86.4.3

Use OnCameraObstructionChanged when gameplay needs to respond to the start or end of an obstruction. The camera can solve visibility on its own without a script.

Source table from React when the view becomes obstructed, page 189
1.Set up a third-person shot and a blocker in Scene Designer. Start with visibility and matching fade approvals. Confirm the effect in Test Scene before attaching an event handler.
2.In your script’s event selector, choose OnCameraObstructionChanged. Inspect the event context and filter cameraId for the shot you care about. The event is delivered after the applicable obstruction or clear delay.
Source table from React when the view becomes obstructed, page 189
cameraIdID of the active camera, for example main.
obstructedBoolean. True on entry into obstruction, false when it clears.
blockerIdsArray of blocker IDs available for this update. Collision can move the view clear, so the remaining visibility blocker list can be empty.
3.  For a first test, have the filtered handler show a short debug message on each transition. Stand
   still behind a wall. You should see an entry, followed by a clear when the actor returns to view.

KEEP CAMERA EDITS SEPARATE FROM STORY REWARDS

If a door opening should grant an item once, keep that grant in the door’s interaction. A camera may become blocked repeatedly as the player walks.

Action Lists & Events                                                                            189
Page 189 of 189Permalink
Go to page