What I want to achieve: I want to filter which classes of weapons to spawn randomly at the beginning of the level. However, the player should be able to restrict the weapon types to be spawned. This info is stored as a custom variable inside the weapon BP.
What I am currently doing: I have created a DT containing all weapons by class (+ other info that I typed manually even though it is stored in the BP itself) and add all classes to an array to iterate through later on.
Any ideas of how I can access the BP variables from just the class (or link the variables in the DT itself?) or how to make this process more efficient / leaner?
Thx for the help, but I haven’t spawned the weapons yet. “Get All Actors Of Class” only returns a reference if the class exists in the level already. I wouldn’t like to add each gun to the world (somewhere under the map) as it is prone to mistakes when I add more guns in the future…
Hope I could make myself clearer this time and thanks for the try
Yeah, I am afraid that this is the only way go, right? I want to do it exactly the other way around. Extract the data inside the BPs and store it in a DT. Or not necessarily in a DT, but just access it BEFORE spawning the actor so that I know whether or not to let it spawn…
P.S. I was using a general “Actor” Class Reference which didn’t show me MY defaults, just the normal ones. By changing the Class Reference to my main weapon BP, I can assign all children classes and access their shared variables.