41. Conversion, organization and testing
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.
| Check | What to try |
|---|---|
| Branch coverage | No key, correct key, already solved, wrong room/actor. |
| Repeatability | Double click, repeated trigger entry, duplicate event listeners. |
| Lifecycle | Leave/re-enter a room, stop/restart a timer, switch player. |
| Persistence | Save before and after the change; reload both. |
| Interface | Empty input, extra spaces, long text, pointer release, keyboard focus. |
| Distribution | Run 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.
