The 15 examples
TPScript ships with 15 teaching files in Plugins/TpscriptUE5/Examples/. They form a graded tour from the absolute basics to several real UE disciplines.
Open the TPScript panel → Examples tab and double-click any file to load it in the editor; then Regen This File to generate the C++.
The core language tour (01–08)
| # | File | Domain | What it demonstrates |
|---|---|---|---|
| 01 | hello-actor | Core | Bare-bones actor: prop, method overrides, Super::, UE_LOG |
| 02 | properties-and-types | Types | Friendly types → C++, field private, default=, category |
| 03 | functions-and-events | Functions | func BlueprintCallable, BlueprintImplementableEvent, method + const |
| 04 | components | Components | Low-level component UType "Name", ctor, SetupAttachment |
| 05 | lowlevel-door | Advanced | Replicated-style door: delegate, timer, 3 components, clamp, broadcast |
| 06 | enemy-spawner | Spawning | Tick-driven timer, TArray<AActor*>, BlueprintImplementableEvent |
| 07 | data-driven-weapon | Data | ustruct FWeaponStats (BlueprintType), DPS logging |
| 08 | interfaces | Interfaces | interface … pure, implements, override |
The discipline tour (09–15)
| # | File | Domain | What it demonstrates |
|---|---|---|---|
| 09 | ai-behavior | AI | AAIController subclass, sight radius, multicast alert, current target |
| 10 | ui-hud | UI / UMG | UUserWidget subclass, widget bindables, BlueprintCallable helpers |
| 11 | animation | Animation | UAnimInstance subclass, blend-space inputs, NativeUpdateAnimation |
| 12 | audio | Audio | UActorComponent audio manager, PlaySound2D, volume stepping |
| 13 | camera | Camera | APlayerCameraManager subclass, shoulder offset + FOV, easing |
| 14 | data-asset | Data | UPrimaryDataAsset subclass, clamp=, derived DPS function |
| 15 | movement | Movement | Movement booster, SetTimer, CharacterMovementComponent |
How to use them
Examples are teaching files - they are not part of any generated module until you use them. To make one a real mechanic:
- Copy the
.tpsinto your project'sTPScripts/folder. - Open the panel → Edit → select the module.
- Regen This File (or Regenerate All).
- Compile.
Every example uses the demo/EXAMPLES_API module; rename meta: api= to your module's API macro when you copy it into your own module.
Walkthroughs
Each example has its own page explaining every line: