Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How to access one blueprint from another via input?

So I have this, lets call it a switch, that I have the player enter it's trigger volume and it prints a message that it has registered the player. Then I allow it to accept input to which I have assigned the F key. After the player presses the F key it prints another message letting me know that the key was pressed. Everything up until this point works exactly as desired. But after this point I'm needing to access another blueprint to have that one do what it needs to do. Currently the only thing I have my other blueprint doing is printing a message to let me know it made it there. My trouble comes in when I can't seem to figure out how I actually get to my other blueprint to get that last message. Currently I have no errors or warnings but the code stops right where I am calling my function from the other blueprint. Below are 2 screenshots, one of my trigger blueprint and one of the wall blueprint that I'm trying to activate. Any help would be greatly appreciated. alt textalt text

Product Version: UE 4.17
1.png (203.9 kB)
2.png (128.6 kB)
more ▼

asked Aug 05 '18 at 10:51 PM in Blueprint Scripting

avatar image

50 3 3 7

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

What you're going to want to do is Cast to the blueprint that contains this function. You have the function Puzzle 1 Solved contained in the blueprints for the wall. So in the blueprints for the Puzzle_1_Trigger_Blueprint you will have to add a Cast To Puzzle_1_Wall_Blueprint after F is pressed. Then you would add in the Call Function node and instead of the target connecting to a different variable you would add it to the "As Puzzle_1_Wall_Blueprint":

This is a recreation of your function. Which I have placed in the blueprint Actor_Apple:

alt text

And this is how you would call to that function from another blueprint. Use the "cast to" node which you would obtain in your case just typing in Cast to Puzzle_1_Wall_Blueprint. Use the get all actors out of class node and the "Get" node for the object. And then you'll notice that the call to function is connected to the "As Actor_Apple".

alt text

And lastly, you're going to want to have enabled the ability to have inputs in the blueprints for something that is not a character blueprint so pressing this button will actually work:

alt text

function.png (205.9 kB)
enable-input.png (227.0 kB)
more ▼

answered Aug 06 '18 at 12:14 AM

avatar image

Alec R
110 4 9 17

avatar image cridia Aug 06 '18 at 12:21 AM

That seems a bit excessive. Really, the only thing the guy needs to in his initial setup is make the TargetBP variable editable and setup the value to correspond with the wall he wants to activate in the level (after having placed the object in the level).

Furthermore, if he uses get all actors, he can only use the switch/puzzle combination once, unless he starts building in extra variables for checking which blueprint to activate. It's a bit excessive when all of that can simply be solved by making TargetBP editable.

avatar image Big_R-07 Aug 06 '18 at 12:33 AM

That was it thank you very much. I hate it when there is something tiny and you just can't see it to fix it. Anyway thank you very much for your time

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question