Can't Set Default Value in variable

I got it working but i’m not sure why it is working. It seems i cannot set the “item”(actor) at all. The struct still knows that the “item” should be the same as the blueprint-actor, why is that?

This was the original problem: I cannot set the “item” that is type of actor. I can change everything else.

Data is passed through interface and it uses the item to know the actor. So it is crusial.

How can the struct know that the actor in “item” should be the same as the blueprint i am in? If i look the iteminfo variable that is type of inventoryStruct i can see that everything else is set except the item but when i set members in the struct the item seems to be correct, why is that? How can the struct know what item i wanted to set as the item when it is none in iteminfo… Althought iteminfo is the one that i use to set members.

The guy who was trying to fix it claims he didnt run into the same problem even though i provided the EXACT project i was working on, which makes me wonder if he followed the instructions properly.

It hasnt been addressed, and i havent been able to progress because of it.

It seems he misundestrood something. Now i know that the way the struct works it is just not possible to set actor with dropdownmenu. Easy way would be simply referring to self.

So when you set the members get reference to self and plug that in the item! After that you can example right click the struct and click remove all other pins. Now every value you’ve set in the struct is working.

And this is other example when i needed to create my shopkeeper items that will spawn automaticly in his shop. After i spawned the item i needed to set the struct and add the item reference! This time its not self but its the item i just spawned so i dragged the wire out of it and put that as the item. Then i removed all other pins so that they are the ones i set in construct. Of course i could set them in “set members in struct” place also.

Let me know if you got it working!

Hi ,

Have you attempted the steps listed above? Does this help with your specific error?

Hi All,
I have noticed that when you set default values for some items in blueprints, if they are contained within folders that have brackets (or any other non-alphanumeric character despite some being permitted for naming purposes), then this will cause an issue.

Best thing to do in that case is ensure any containing folder above the blueprint does not have any non-alphanumeric characters. If so, simply rename the folder, restart the editor and try again. I had an issue just like this, but I had a bracket in my folder name two levels above the blueprint. Renaming did the trick for me. Perhaps this may be of use to someone. This comment does not directly answer the exact question, but is very close in nature - so others might find this useful.