Skip to reading
Getting started with PCA3D

26. Find the parts and repair the clock

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
On this page

26. Find the parts and repair the clock

True

1. Change Scene - sceneId = archive; spawnId = entry

False

1. Set Variable - name = archive_open; value = true

2. Add Score - amount = 10

3. Show Message - text = The lock turns. The archive is open.; duration = 3.2

4. Change Scene - sceneId = archive; spawnId = entry

Check your work. Start fresh in workshop. Try the locked door first. Get the key, open the door and return. The second visit should not require another key or award another 10 points.

The owl#

Give owl a Use interaction. Show the short owl message, then test wheel_taken. If the wheel was already collected, show the empty result. Otherwise set wheel_taken true, give brass_wheel, add 20 points and update the objective.

Keep the owl itself visible. It is a prop that held an item, not the item that should vanish into Inventory.

The oil can#

Give oil_can a Take interaction. Guard it with oil_taken, then set that flag, give bearing_oil, add 10 points and show the pickup message. The original can remains visible in the demo, with the guard preventing another reward. If you later choose to hide it, that is a deliberate variation rather than a required step.

Fit the wheel#

On Inventory item brass_wheel, add a target rule for entity:master_clock. If wheel_fitted is true, show the already-fitted message. Otherwise set wheel_fitted true, remove brass_wheel, add 20 points and explain that the bearing needs oil.

Oil the bearing#

On bearing_oil, target entity:master_clock. First test wheel_fitted. If false, ask the player to fit the wheel. If true, test oiled. If already true, show the repeat message. Otherwise set oiled true, add 10 points and explain that the clock is ready for winding.

The demo keeps the oil item after use. The nested checks stop repeated points. A visible item remaining in Inventory is not itself proof that the rule failed.

Page 67 of 184Permalink
Go to page