Can't use class as component? (Passing variables to components.)
So, as a short introduction, I started learning UE4 maybe a week ago with a background in C++, UE2.5, and various other shizz such as GameMaker and XNA.
I started out following some of the tutorials on their YT channel, and I decided I wanted to try to create something of my own, so I set to creating a very basic random level generator. The basic way I'm setting it up (which I'm sure is probably a horrible way to do it, but it's basically just for practice anyways,) is by having a MasterPlacement BP which holds some variables for generation, a Placement BP, which is what actually creates the "rooms", and a Room BP, which has derived BPs that contains the objects comprising the physical rooms as well as Placement's for any exits to the Room.
The problem is, I need to be able to access variables that are stored in the MasterPlacement from each Placement, and I can't figure out a good way to do it. What I'm currently trying to do is pass a reference to the MasterPlacement to every Placement created, but I can't figure out a way to pass a variable to every Placement in a Room so that I can pass the variable.
The way I was trying to do this was by using a "Get Components by Class" action to get a reference to all of the Placements, however, I'm unable to do this, as it is saying that my Placement is incompatible with Actor Component Class.
TL:DR; I'm trying to figure out a way to pass a variable to all of the instances of one class contained in a BP, without having to manually create a reference to every one of those instances.
Sorry about the long backstory. I probably didn't paint the most vivid picture of what my problem actually is, so any questions are welcome, but I really don't know what information is useful as I'm relatively new to BPs.
Any help is appreciated! Thanks for reading!
asked Jan 26 '16 at 09:19 PM in Blueprint Scripting
Follow this question
Once you sign in you will be able to subscribe for any updates here