Hello,
The situation: I have a game much like Heroes of Might & Magic or Disciples. This means I have World maps and small battle maps. Upon encountering an enemies, the battle maps are open through [OpenLevel]. The battle is won or lost, so far so good, returning to the world level with [OpenLevel] and here, the problem begins:
The encounters in the world map are placed at design time, not spawned, and I would like to keep it that way if possible.
I can’t seem to find a way of destroying encounters which were fought, so that upon re-opening the world map they don’t show up anymore.
What I’ve tried so far:
- Tried sending dummy refs of the encounter actors to the GI to be added to an array which would find them and destroy them. This obviously doesn’t work since the dummy ref is to an actor which isn’t the same actor spawned in the previous instance of the world map, so it never gets found in the array after the new instance of the map is loaded, thus never gets destroyed.
- Sending characteristic vars to the Gi on level load (every encounter reports it’s data to the GI) won’t work either since I have encounters which also generate procedural data (number of enemies, army strength etc) which means they will roll the numbers again on their next spawn etc.
- Other shenanigans that don’t work at all - for obvious reasons otherwise.
TLDR: How do i destroy design-time placed actors at runtime, upon re-opening the level?
Please help?
Thanks, and sorry for the long post.