Download

Is there a way to spawn an Actor in multiple levels (maps)?

Let`s suppose you collected an special Item in one of the game levels (map1). This item spawn a creature in the level. But when I go to other level (map2, map3 and map4) I want to have that same creature. The challenge here is: If I not collect the special item in map1, I don’t want to have the creatures in map2, map3 and map4.

How could I work in this situation? I have no idea how to communicate between the levels (maps).

Thanks.

By the way, I thought in one situation: I save both maps, one with creature and one without creature. So in the map1, if the item is collected then open map with creature, if is not, open the map without creature.

That is the only logical way I could find, but, there is no reason to have 2 saved maps, consuming more hard drive space. Lets suppose I have 50 maps, in this way I am thinking I would have 100 maps. Thats no make sense for me.

You could put a spawn point for said monster… And when you join that level check playerstate for the item needed and if they have it spawn the monster? You’d need a delay in the level begin play to ensure player has joined before running the event. Just a thought.

Extend the GameInstance class and set your project to use yours. You can put variables in here that are saved between maps. You can also put functions in it that can be called from anywhere.