Quick answer: Don’t set instance-editable properties in Construction Script — the script overwrites your level edits on every reload. Mark variables Instance Editable and edit them in the level inspector.
A door BP has a “Locked” bool. Designers tick it in the level for specific doors. After saving and reloading the level, every door is unlocked again. The Construction Script sets Locked = false at the top, undoing the per-instance edits.
Construction Script Lifecycle
Construction Script runs:
- Every level load.
- Every property edit on the actor (a “rerun” in the editor).
- When the actor is added to the world.
If you assign a variable inside Construction Script, that assignment happens every time — including overwriting any level instance edit.
Expose vs Initialize
Two patterns:
- Instance Editable (Public eye icon on): the variable can be edited per-instance in the level Inspector. Don’t assign in Construction Script; the Inspector value persists.
- Default Value: set in class defaults panel. Same for every instance unless overridden.
For “is this specific door locked”, use Instance Editable with a class default of false. Designer ticks specific doors. No Construction Script involvement.
Construction Script for Derived Values
OK use cases:
// Construction Script
if Size = "Large":
SetMesh(LargeMesh)
SetCollisionRadius(200)
elif Size = "Small":
SetMesh(SmallMesh)
SetCollisionRadius(50)
Size is Instance Editable; derived values (mesh, radius) recompute when Size changes. This is the script’s sweet spot — reactive setup based on configuration.
BeginPlay for Runtime-Only State
For values that should only initialize at game start (not on editor reloads): move them to BeginPlay.
// BeginPlay (Event Graph, not Construction Script)
SetCurrentHealth(MaxHealth) // runtime only
BeginPlay runs once at gameplay start. Editor edits to MaxHealth still persist; CurrentHealth resets fresh each play.
Verifying
Edit an instance variable in the level inspector. Save and reload the level. The override should persist. If it resets, find the Construction Script line that’s overwriting and remove it (or change to read-only derived).
“Construction Script reruns. Anything you write there is reapplied. Use for derived values, never for level-editable state.”
When auditing a BP, search for SetXyz nodes in Construction Script — each one is a potential override of instance edits.