Download

Dungeon Architect Instance counter and destruction

Hi Guys,

so first post here, but I’m working on a project that uses Dungeon Architect. For those of you who don’t know this plugin allows you to create themes that generate procedural dungeons. Now one of the functions that aren’t implemented currently is an object counter, this has become a serious frustration as we don’t have any control over the amount of times as it only spawns based on probability.

So here’s what I’m trying to do - I want to create an object instance counter, if the counter reaches over N then destroy the extra instances that are generated. Now I initially figured that I could just swap the static mesh actor with a blueprint to achieve this but my concern is that the blueprints won’t communicate between each other and if they do they’ll just destroy all the instances that are generated.

So would I have to create this in the level blueprint? Or would it be a case of setting a class integer that all the instances would reference? I initially presumed it would work something along these lines -

Get Object Count (self)

if return value greater than 1

destroy self.

But I’m kinda stuck figuring out the logistics of best practices for this, the creator of Dungeon Architect did give me some advice however what he suggested isn’t possible with how the blueprints are read within DA so it would have to be it’s own standalone thing.

Any help on this would be absolutely fantastic!

Cheers guys!

So I’m using the spawn logic that’s built into DA, however as expected I’m coming across the error where as soon as the object count reaches over 1 it’s destroying all instances of the actor. Is there anything people can think of that could keep a singular instance spawned but destroy the rest?