I put some Blueprint around a simple destructible mesh I created (the blueprint actor is called “ColorChange”).
When I destroy it, I want it to disappear after a certain time, then reappear after a certain time. Here is the code I succeeded to do :
This thing work, but the problem is that I’ve got a lot of this actor on my map on a little surface, and I disabled gravity on my destructible mesh. So when it try to spawn the actor, there is always some debris, and the actor is spawning on the debris. So… The game is crashing (i’m not even sure it’s related to this, but I think so).
So here I would like to reverse the two number inside the “Set Life Span” node and the “Delay” node (in this way, the debris will disappear before the new actor appear). But it seems that if the Lifespan duration is lower than the Delay duration, the actor won’t appear.
Do you have any ideas ?
Thanks for your answer !
Yes, this is surely due to this.
The idea is good but in fact I can’t make it spawn another actor. It must be the same actor, because that means I must create the same blueprint code for each new actor (hundreds of actors !), and the problem is that this actor is planned to be use as a destructible floor on a Unreal Tournament map, which means it will be destroyed several times during the game
This is working very well, but the “Spawn Transform” value doesn’t seems to follow what I want. The actor isn’t spawning at is initial location, but at a random place in the map (seems to be 0 ; 0 ; 0) : http://youtu.be/fuuICnPuyYk
As 42EspoiR said, when my actor is destroyed, I can’t get the location from it anymore.
So I wanted that, directly when the game start, it simply gets the location from the object.
I start to understand how to “think” blueprint
EDIT : But… There is always a little problem… If I want my rectangle actor to respawn fast, there is always a risk that the actor respawn on some debris. And the game seems to crash only if the actor is respawning on some debris coming from a destructible mesh. I hope this will be fixed on an upcoming UE4/UT4 update.
EDIT 2 : Well… I’m wrong, it’s coming from another node group (inside the same blueprint) modifying the Material when the character is overlapping with a box placed just above the “Box_Rectangle” I’ve done. I will report this. So this bug have nothing to do (or not at 100%) with the actor respawning on some debris.