Can't get value inside of blueprint struct - need help

Hi,

I have a weapons blueprint made for some .223 ammo and it has a struct with many different variables, eg:

• item name
• item weight
• item description , etc.

In my main inventory blueprint I want to compare a (box of .223 ammo) vs the (single .223 bullets) buy their struct name “item name” and not by their blueprint name or class name. Is there a way to get access to a blueprint and its struct and grab a variable form it? I can hard code the names as a string but if I rename the weapon blueprints or their “item names” in the struct, I will have to go back and manually change them.

Thanks in advance

Hi,

You can access the data in the structs if you grab a wire from the struct variable and search for ‘Break’. You will find your ItemName variable and you can compare it to anything you want.

If you want to access data in another Blueprint, you need to get a reference to the object you want to access.
If you have your inventory on your player, get a reference to your Player first, then you can access all the variables in it. Search for Blueprint Casting, the docs will give you an overview on how it works.