x

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 communicate a boolean set in one blueprint to another?

I just started blueprint scripting inside UE4 this week and am having trouble communicating a boolean between two Blueprints. I have looked at dozens of posts about Blueprint Communications, making variables public, and Blueprint Interfaces and yet I cannot for the life of do what seems like it should be a simple task.

The first picture sets a boolean that I want communicated to the second blueprint. alt text

Below is the BP I want the first BP to communicate too. A Condition needs the boolean in my first BP in order to proceed with the level. alt text

Product Version: UE 4.19
Tags:
1.png (109.4 kB)
2.png (75.9 kB)
more ▼

asked May 23 '18 at 01:35 AM in Blueprint Scripting

avatar image

Kami822
24 4 4 9

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

2 answers: sort voted first

Hi Kami822,

If you are trying to use a variable from one blueprint in another you can use casting. I recommend taking a look at the documentation I have linked below:

https://docs.unrealengine.com/en-us/Engine/Blueprints/UserGuide/CastNodes

more ▼

answered May 23 '18 at 01:29 PM

avatar image

Jeremy Q ♦♦ STAFF
946 3 7 5

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

What you're going to need is for the second Blueprint to have a reference to the first.

Add a variable to the Second BP and change its type to be the type of the first BP.

alt text

Then set that reference in level or get it on begin play.

Finally use that reference to get the bool value from the first BP.

alt text

capture.png (17.4 kB)
capture1.png (22.9 kB)
more ▼

answered May 23 '18 at 12:52 PM

avatar image

HarryHighDef
1.4k 2 14 17

(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