In 1/10 ViewPort Simulations, I get an Infinite Loop error in this custom event that destroys overlapping rooms when I build the level. Even after executing the IsValid
node, I keep getting these two errors from the blueprint:
Blueprint Runtime Error: "Attempted to access BP_Room_C_158 via property K2Node_CustomEvent_LastSpawnRoom, but BP_Room_C_158 is not valid (pending kill or garbage)". Node: Branch Graph: ForEachLoop Function: Execute Ubergraph BP Procedural Dungeon Generator Blueprint: BP_ProceduralDungeonGenerator
Blueprint Runtime Error: "Accessed None". Node: Branch Graph: ForEachLoop Function: Execute Ubergraph BP Procedural Dungeon Generator Blueprint: BP_ProceduralDungeonGenerator
This is the only ForEachLoop
that has access to the variable LastSpawnRoom
:
For some reason, the ForEachLoop
keeps accessing the same actor I just destroyed, even though the previous event should have spawned a new actor and set it as the Last Spawn Room
.
The game uses random seeds, and only some seeds show this problem.