Blueprint Interface - How do you retrieve variables once you have passed them?
So I am working on a blueprint interface so I can pull variables stored in my GameMode blueprint and pass them to my Map Generator.
Interface is implemented on both BP's under blueprint props.
Interface has inputs for 4 variables which are connected in the GameMode BP to a Interface Message node. The Interface Message node also has the MapGenerator blueprint variable attached to it's target input. I take this to mean I am sending these variables into the interface for retrieval by the MapGenerator BP.
In the MapGenerator, I have the Interface Event that outputs the variables I am trying to pass. This event never gets called. Going through the documentation this seems to be the way to pass the outputs of this interface but it just isn't firing. I tried calling the event directly but it doesn't show up in the context menu.
What am I misisng?
asked May 15 '14 at 03:26 AM in Blueprint Scripting
Try this setup:
GameMode blueprint has **I**GameMode (blueprint interface) IGameMode has "NewFunction" with 4 input variables as you said. You can call this function to run stuff but also to return some values without calling any messages.
Then, you don't need any interface set on MapGenerator. Just right-click and look for "NewFunction", it'll be in "Interface Messages" under "IGameMode_C" category. Place it on graph and apply inputs and outputs as you wish, you can pull off returned variables from the right side of this node:
Finally, define what "NewFunction" does in the BGameMode blueprint:
Follow this question
Once you sign in you will be able to subscribe for any updates here