Download

Blueprint object variable will not accept a value

I feel like I’m missing something really obvious here.

I have a pawn, and I want it to be able to hold an inventory object. I’ve created a variable within my pawn that is supposed to take blueprints of the class item_parent, so that it knows that item is present. The Item blueprint is nothing complicated, just a series of variables meant for the pawn to retrieve to determine damage, accuracy, etc

https://i.sli.mg/rsT0aC.png

This is what happens when I try to add it to the pawn, whether here in the pawn blueprint, or in an instance of the pawn within my level. What am I doing wrong, why won’t it accept this?

Hi Selentic. I think what you need to do here is use the Class of the Item Parent you can select that by re-selecting the variable type and choosing the purple Class option instead of the blue reference option you have here. Or you could potentially spawn the item you need in your event graph on begin player and then attach to your Pawn, which would make it possible to then get a reference to the item and change properties on it before play if you need to. As I understand it items that have not been spawned yet should be called as the class, while objects already spawned into the world can be called as a reference.

That understanding may be flawed though, it was only about a week ago I was stuck on the same problem. It took me a good few days of tinkering to work it out. :slight_smile: Hope this helps anyway.