Picking up item unloads current stream level

Hey again everyone,

I finally got my inventory and crafting system set up and have started setting up different levels for my level streaming process. Now I’m having another issue though. When I play the game in the editor and pick up an item, the level unloads and I fall to the bottom of my map. I can provide screenshots if necessary, but I didn’t initially because I’m not sure which ones will help.

To load my levels I set up a box collision and have it set to load the stream level upon overlap.

Hi Entropikz,

  • Is there any asset that could be overlapping the box collision when this occurs?

  • Can you show me your overlap script?

  • What steps can I take to reproduce this on my end?

  • Does this occur in a clean, blank project with no additional content or is it limited to one project?

Hi ,

To answer your questions:

*Yes the box collision overlaps the entire level. Which causes the items in the level to overlap. I just started using the level streaming function, is this bad practice?

*Do you want the overlap script for the level streaming or the item itself?

*I created an inventory system and have a simple “can of food” placed in the level. When picked up the item is destroyed and added to an inventory array. When dropped it re-spawns in front of you. From there you can enter the inventory and click a button to “eat” the item, restoring your hunger variable.

*It’s definitely limited to this project alone. I have multiple copies of the project and even a few blank ones for testing purposes and this can’t be duplicated.

For now the level streaming overlap should be sufficient, I’ll look at the other if I can’t see what I think may be occurring.

It sounds as though you have it set that whenever an actor begins/ends overlap, it will unload the level. When an item is picked up into your inventory, I am assuming it is destroyed or moved, which would cause the end overlap to fire if you don’t have it set to check specifically for your player character.

Yeah that’s how I have it set up. But I’m not sure what you mean by checking for your character. I have it set up so when the item is destroyed it will be cast to the character and added to the inventory array. I don’t know how to check for the character other than that.

Never mind I think I figured it out. I thought you meant that the item would check for the character. But I think you meant that the trigger boxes would check for the character. I added a character cast to the level streaming logic and now it works.

Thank you for helping me! I’m gonna mess around with this a bit and make sure everything else is working properly.