I've got a moving train blueprint that respawns, but it won't move after respawning. Why?

I have a train blueprint that’s designed to move across my level, be destroyed by a killzone out of sight, then be respawned at a target point where it started. That works fine, but when the train respawns, it just stays there.

This is problematic since the goal of my level involves another actor that needs to be destroyed by the train, and this cannot be done if the train crosses the map only once and never spawns again.

I’ve attached screenshots of my level blueprint as well as the train’s blueprint, but I can’t figure out how to get both to fire off the movement impulse again, which is frustrating. An associate of mine suggested learning c++ to code a “Event OnRespawn” function into blueprint, but I have neither the time nor the inclination to toil away with coding when I already despise and struggle with the relatively user-friendly blueprint format, so if anyone knows a solution it would be greatly appreciated.

Try putting a short delay ( .2 ) after begin play. Does that work?

PS I don’t see DestroyActor anywhere…

No dice I’m afraid, as soon as it respawns it completely ignores the movement nodes and just sits there like a lemon.

As for the why you can’t see a destroyactor anywhere, that’s bc the destruction is handled by a killbox. I did try to have the destruction part self-contained in the train BP, but the event destroyed node would just cause the engine to freeze whenever I compiled it.

Try play from start in timeline.

Hm…

You could try ‘play from start’, as @ShaunOfTheN00bs recommends, but if that works, then you’re not killing a re-spawning at all…

As @Anand_Kumar_9 suggested, I tried connecting the BeginPlay node to the play from start socket of the timeline, but that still yields the same result of the respawned train spawning and not moving at all

Ok, my next theory.

You’ve set Dist to something other than zero on the train in the level, but the default is still zero on the spawned train.

1 Like

So what you’re saying is that I should change the default value of Dist to avoid it defaulting back to 0 when it respawns?

Yes. If the default is 0, that’s what the spawned train will get.

1 Like

You genius, you have solved a gripe of mine that has been my arch-nemesis for the best part of a month :smiley:

1 Like