Reparent Spawned actor to different streaming level
Here's our situation: An actor spawned into the world can be spawned into the streamed level as its parent and then be removed from this streamed level as the player travels to a different part of the world. That means when that level is unstreamed the actor will be unstreamed with it. Where this gets complicated is that say you craft a weapon at the furnace in the main map - this is being spawned in the main map. If you bring it over to a streamed level like our cave systems, drop it, and leave - it's going to stay behind, parented to the main map, and when that streamed level ceases to exist it will fall forever and be lost
By default all actors spawned at run-time are spawned into the 'overworld' though or rather whatever the main level is. The opposite is also true. If a streamed level has a cool axe in it and you bring it home, when that streamed level ceases to exist that axe is getting despawned.
So the question is, is there any way to do this currently with UE4?
asked Dec 14 '16 at 04:04 AM in C++ Programming
There is two possible ways to reparent an actor:
But there is extra trouble with items lying on streaming levels. When your level will be loaded again all items you placed in the editor will be respawned because you can't and shouldn't save ingame changes on a disk. Usually these problems is solved by creating a special class "Prop" which just gives an actual item to a player, and all items is bounded to them player owner or inventory or something else which will survive between transactions. To prevent respawning items your prop class can request some persistant object which keep tracking eaten items. So, your crafted custom items just should never been streamed out.
answered Dec 14 '16 at 10:57 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here