hi guys
workflow question. I got some enemy spawners that spawn enemies at begin play.
I implemented a save/load system that works. and keeps the enemy position stored into the save data and works when loading.
problem is when i load the game, the spawners are still there, so i get duplicate enemies.
What would be a good way to deal with this?
I also didnt want to do a for each loop at load and get rid of the spawners because in some instances i need to teleport back the enemies into their original spwaning position.
I’m not sure I understand…
It is spawning as you re-enter, and the saved instances are resulting in duplicate spawn?
If so, without seeing what you’re working with… perhaps a Do-Once node on the spawning script so that it only happens the first time you enter the level?
Depending how you get there, if it is something that would refresh the node, a game instance level bool per level indicating a level has been used would work just as well.
So what happens is when I load the savegame file I spawn the enemies in the stored positions, but because the begin play of the enemy spawners are to spawn enemies I get a duplicate of them.
I want to make sure if they’re somewhere in the world I keep track of their position, but in the even if a game over and go back to checkpoint, lll get rid of their custom position and that they be respawn Ed at the spawner location instead