Skip to reading
PCA Script Programming

41. Conversion, organization and testing

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

The PCA editor includes autocomplete, validation, formatting, Go To, references, rename, Go to Record, event simulation and conversion to visual scripting. Use them to keep a script readable before it becomes large.

Conversion creates a new record and preserves the original. It supports a useful subset of constructs; warnings matter. A complex loop, custom data operation or cross-language call is not guaranteed to turn into an equivalent editable graph. Keep the source version as the reference until you have tested the converted behavior.

Source table from 41. Conversion, organization and testing, page 49
CheckWhat to try
Branch coverageNo key, correct key, already solved, wrong room/actor.
RepeatabilityDouble click, repeated trigger entry, duplicate event listeners.
LifecycleLeave/re-enter a room, stop/restart a timer, switch player.
PersistenceSave before and after the change; reload both.
InterfaceEmpty input, extra spaces, long text, pointer release, keyboard focus.
DistributionRun the exported build with its actual assets and renderer.

Keep one job per script/function where practical. Names such as unlock_archive, accept_name and

restore_lab_state tell a future reader what the call is supposed to do. A small library of clear functions is easier to repair than a single script that owns the entire game.

No practice project is required for this book. The examples name a small workshop so the references stay consistent. Adapt the IDs to your existing project and test on a copy before adding save deletion or quit operations.

Page 49 of 357Permalink
Go to page