Anyone know why I cant set the default value of my array?

Whenever I try to select the class I want to be the default value of an index in my array it stays as “none”, I was able to change this before but I recently created a new structure that I wanted to add to the array and it wasn’t working so I deleted all the indexes and tried to re add them and now I can’t.

UnrealEditor_pDTP7hPhg0

edit: sorry about the awful gif quality didn’t realise it was that bad

1 Like

Make sure that they’re spawned first :blush:

I’m using this array to spawn the structures, I didn’t have them placed down before and it was working fine. Is there a way of doing this without having these things placed in the world?

1 Like

You don’t need an array for that, just a Select node and an int type variable (to plug into the Index pin of the node) would suffice :innocent:

That’s not the issue I just need to add things to that array for a lot of my mechanics to work, is there a way to add these things into the array without placing the structures into the world if not il try doing that.

1 Like
  • this should work as is
  • what is the actor class set to in the struct? Actor Class?
  • is there anything in the Construction Script of this actor (should not matter, tbh)
  • is this a project migrated from a previous engine version
  • which engine version is this?

If you create a new struct with an actor class array type and add the struct var to a newly created actor - do you get the same behaviour?

There is no construction script as this is an actor component should have mentioned that in my original post, this hasn’t been migrated from a previous engine version and its version 5.4.4. And the parent class of the base structure is actor I don’t know if this is what you were asking for though.

Didnt see the last part but yeah I already tried that and it wasn’t working

Can you set it to Actor rather than the base class? Just to test to test it.

If I make an actor class array instead of base structure array It still gets set to “none” whenever I try to set one of my structures but everything else is fine.

1 Like

Also I changed the parent class of one of the base structures children and tried to add that to an actor class array and still coulden’t.

Do you know why this is happening? I’m unable to progress within my project because of this issue and have no clue how to fix it.

Sadly, I can’t replicate it. Does it really happen to a brand new actor with a brand new struct?

I think we have had a bit of a misunderstanding when I say structure I mean as in literal structure like a house as I’m making a city builder, this array is of all the structures (buildings) that my game has and the player can place down haha.

My issue is I can’t add any of the buildings into my array anymore although I could do it before, even if I change the parent of one of my buildings to actor I still cant add that building to an array. I even tried making new arrays in different blueprints and I still wasn’t able to do this. I can make arrays for other things and they work however I cannot add my buildings into an array.