Hello,
as per object i was wondering if there is any way to change the state of a Boolean inside a Struct trough a Box Collision in game.
I will explain my case in details.
I have an inventory that i made following a Udemy Course.
The inventory has its own Structs to store items data (Can be dropped, can be used, item name, desctiption etc.)
These value are being set inside a child BP of a BP Actor “Inventory Item Master”.
I saw a similiar question on this forum (here), where the answer was this:
You can use set members or make.
Inside your actor “shop” you should already have a variable type “your struct”, connect it to a “Set members in “your struct name””. Select the Set members node, on the right side tick the option you want to make visible and set it in the event graph. Connect the output to your first created variable on your actor to set the reference on it.
The diamond output instead of a circle is because you are creating a new reference.
Basic setup:
I tryed it, but it seems not working.
Following i attach detailed screenshot of my situation, i hope that someone could help me figure out how to solve this:
This is the Item Data struct:
This is the Item Master:
In the screen you can see the 2 childs.
This is one of the child in detail:
So i tryed to make the variable “Can be used” to False when not overlapping the door and to set to true when overlapping it, as it follows:
But my knowledge about these structs are very poor and i obviously didnt make the correct code.
Can someone help me please?
Thanks in advance!