So I have this BP where you can read a wooden sign and I want to store all the text possibilities for the sign in an array and choose which one pops up when placing the sign in the world. I made an editable int in the sign BP to be able to select which text pops up from the sign, but the problem is if I put more than one sign in the world they all display the same message. Can’t tell what I’m doing wrong this time.
I meant I know that GetAllActorsOfClass is far from being the best thing to use, but I can’t use event dispatcher direct bp communication won’t work through overlaps and BP interfaces just plain suck. All of this due to the fact that I’m trying to communicate between a function in a widget and a blueprint. Simply getting a reference of the sign BP is what I tried first and led me nowhere too.
Your pro tip makes sense though, why do I always have to overthink things ?
Oh yeah now I get what you mean. I’m getting tired, doesn’t take much to lose me today hehe. Anyways now I get it, and the exposed on spawn works wonders. Thanks a bunch mate.
Your Probably have something like a Linetrace or Overlap that returns you a Sign after you Cast to it. Probably in your Player Character. Than you create that Widget Pass that refference along (You exposed it on Spawn there should be a Pin now) and Add it to the Viewport. Call it a Day
Pro Tip: Make a Text Variable on your Sign and use that directly instead of the Index. Why you bother to keep track of them in the Widget BP? Read it directly from where it comes → The Sign.
Also Watch it again and play around with what you learn. Make a throw away Project and simply Practise and experiment throwing Data around from BP to BP in the various ways. Refer back to the Video if you got trouble listen very closly to what Zak says he does explain it very well =)
The Answer I Posted is the Way to directly Communicate. The Problem you got with GetAllActorsOfClass you have to manually filter out the Specific sign you want and thats as effective as creating a new Widget for Every Sign you have + the Overhead of Filtering. (btw dont try it not worth at all)
Can you screengrab the BP where you Create your Widget and the Nodes that come before?
The thing you see after the Create Widget is how you set it via Ref (You dont need todo that if you use the Exposed Method, also forgot that you have to input self there as well)
In your Widget Not your SignBP! If you are confused about the Node that comes after simply start typing the name of the Refference Var Name you set in the Widget. I think you get what I mean once you try (but again you dont have to it will just set it twice would make no difference, but thats a Example how direct Communication Works)