Announcement

Collapse
No announcement yet.

Can't create an array of Actor Blueprints. Is it even possible?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Can't create an array of Actor Blueprints. Is it even possible?

    Hello,

    I'm trying to create an array of Blueprints within a widget but struggling to find a solution to this from other threads. My current setup uses modular BPs made up of several Static Meshes. In order to quickly iterate the layout of the level I use Arrays of SMs (with the appropriate tag) to change what is generated per modular BP (see this post for an example https://polycount.com/discussion/209...way-complex/p1 (June 7th, mid way down the page)).

    I'm now looking to add lighting to the scene. I've tried the "use emissive as static lighting" and this gets me so far but because this is activated per SM in the BP I can't set this on all the SMs in the BP as only one is present (the other SMs are generated/replaced using the SM array from within the widget). If I can use an array of BPs instead of SMs then I can attach static lights to the BPs and use these to better light the level. Is this possible as choosing Actor > Object Reference in the variable type doesn't allow me to add BPs to it.

    Current SM array setup (click a button to change the SM from an array):

    Click image for larger version

Name:	SM_Array_01.jpg
Views:	962
Size:	127.9 KB
ID:	1700823

    Actor array doesn't let me add Actor BPs:

    Click image for larger version

Name:	BP_Array_01.jpg
Views:	919
Size:	131.1 KB
ID:	1700824

    I'm using Unreal 4.22 and my BP knowledge is limited. Any help is much appreciated!

    Thanks.

    #2
    I think you could use an actor class reference (purple) instead of object (blue).
    WIP ShootOut - 3rdPerson ARPG

    Comment


      #3
      You can add those actors to your array from the editor view port if you already have all the actors placed in the level. Just set the Instance Editable parameter of your Lampposts array to True in the details panel, and the array will be exposed to the editor.

      You can then add your actor references to the array from the dropdown menu as shown here:

      Click image for larger version

Name:	editablearray.jpg
Views:	904
Size:	369.1 KB
ID:	1700861
      Unreal Possibilities
      Grid Creation Systems | Tower Defense Starter Kit | Wave Spawning System [50% OFF]

      Comment


        #4
        Stormrage256 I tried that and had no success unfortunately.

        silik1 Changing the class to the purple one worked but I got stumped a bit further down along. My other static mesh nodes have a "cast to staticmeshcomponent" followed by a "set Static Mesh" node at the end of the flow. Is there a "set Actor" node I can use? Here's where I'm up to but it's not working (or displaying the print text):

        The top screenshots are not related to my problem!

        Click image for larger version  Name:	Hallway_Progress_69.jpg Views:	0 Size:	507.4 KB ID:	1705191

        Comment


          #5
          I'm far from an expert in classes and inheritance.
          This type "Actor class" doen't point to any actual object in the world, it's a reference to a class, if you want to use it in your world, you have to spawn it or create it, and then you get an actor reference (blue) which exist in the world.
          WIP ShootOut - 3rdPerson ARPG

          Comment


            #6
            Your project has two distinct "universes".
            The one where everything is just asset data and the other one where you have an active "World" with spawned instances in it...
            It's your responsibility to know which is which when you are writing blueprint "code".
            | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

            Comment


              #7
              Back onto the learning curve I go! Thanks for your comments!

              Comment

              Working...
              X