When NPC is constructed it doesn’t have the component yet, I guess. Which makes sense, its components cannot be there before it.
You have to wait, aka:
EventBeginPlay>>get MyVar.
You can get the values from the component, but customizing its variables from the editor will not result in the changes being reflected immediately. You will have to start an instance of the game to make that happen.
If you want to reflect the changes in the editor itself, I believe you have to update the variable manually through the construction script of the owning actor.
For my use case I’m trying to hide or show a billboard component based on the values of a different component (basically as an in-editor warning). Anyone know of a way to do that kind of check/update before BeginPlay is called?
Instead of relying on blocking collision, use a Trigger Volume (Box/Sphere Overlap) and handle the behavior manually:
1. Detect entry into boundary
Place a larger invisible volume where the “soft wall” starts.
Use OnComponentBeginOverlap to detect when the player enters it.
2. Gradually reduce player control
As the player gets closer to the edge, scale down their input or velocity.
For example:
Map distance → speed multiplier (1 → 0)
This creates that “pushing against resistance” feel This is a known technique: mapping distance to movement limits instead of stopping instantly (Epic Developer Community Forums)
3. Apply opposite force (rubber band)
When inside the volume, apply a force or movement offset back toward the center:
Direction = (center − player position)
Strength increases the deeper they go
4. Release behavior
When player stops pushing, the force naturally pulls them back → gives that elastic feel
Alternative (simpler Blueprint logic)
A very common pattern suggested by UE devs:
First phase: slow player to a stop (~1 second)
Second phase: apply increasing force pushing them back