I am making an item that players can spawn in. The item on a screen will display different information like owner name, name of the item, and a few variables that are specific to that player’s item(an actor I guess).
What I am struggling to do.
Return values just for that specific item for that player
All values are currently shared between all the items
What I have tried.
I started by just doing a “Get All Actors of Class” to get the system working for 1 item but I know this will not work and needs to be replaced with another method of getting the correct actor.
I thought Arrays might work and just add each new item to an array on spawn? Couldn’t get it working though.
PS: I am new to UE4 sorry for wrong terminology or if this is a common concept.
Attached below is a function to get the current status (string) of an actor. How I have it setup is when you hit a button on the UI on the actor it changes the status to something else. If I have 4 of the same actor down it will change the status on all of them instead of just 1.
I know the “Get All Actors of Class” is the wrong way of doing it but I want to know how I can just change the variable on that one actor I’m interacting with.
I have a widget component on the actors. Each actor uses the same widget. But this is eventually going to be something that players can buy from an in-game store and it spawns for them.
E input is in FirstPersonCharacter BP. I see that you have WdigetInteraction there too. Is it a component? Or variable? If it is variable, where do you set it?
Actually, it seems as if I still can’t access variables just for that one BP_MoneyPrinter1. I am trying to access them in the UI_MoneyPrinter but when I can’t figure out the appropriate Object to attach to the Cast to BP_MoneyPrinter1