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"

Accessing Variable in Level Blueprint from other blueprint

Im trying to acess bool variable of XXXXblueprint parent of character.h in LevelBluePrint, but it rising error

alt text

I reffered all links Direct BluePrint Communication document and some of UE4 AnswersHub but no use What I did is just Creaate Object Reference variable of XXXXBlueprint in LevelBluePrint and accessed it, but no use.

alt text

I need to access variable from other blueprint into levelblueprint

Product Version: Not Selected
Tags:
error.jpg (27.2 kB)
error1.jpg (100.5 kB)
more ▼

asked Apr 30 '15 at 08:55 AM in Blueprint Scripting

avatar image

Rasa
23 3 6 9

avatar image Narghile Apr 30 '15 at 09:30 AM

Is the XXX BP in the world when event begin play if fired?

Also, At what point is the reference being created, I would normally do that at begin play.

Narg

avatar image Rasa Apr 30 '15 at 09:33 AM

Hey I'm newbie, I cant get what your asking Blueprint in the World means EventBeginPlay wont work in level BP?

avatar image Narghile Apr 30 '15 at 09:34 AM

ok, give me a sec.

Narg

avatar image Narghile Apr 30 '15 at 09:46 AM

Here is an example of how to reference another BP

alt text

As you can see, this is done right at the beginning.

Then I can pull any data later on.

alt text

As far as I can see, you are trying to get a Var, before the reference is made.

Does this make sense?

Narg

capture.jpg (38.7 kB)
capture.jpg (20.6 kB)
avatar image Rasa Apr 30 '15 at 10:18 AM

Raising same error alt text I dont want set the variable of other BP in LBP just i need to access it

error2.jpg (74.8 kB)
avatar image Rasa Apr 30 '15 at 10:19 AM

alt text

error3.jpg (32.8 kB)
avatar image Narghile Apr 30 '15 at 10:39 AM

Ok, your sweep reference is your LeapDebugCharacter BP?

Narg

avatar image Narghile Apr 30 '15 at 10:43 AM

Try it like this

alt text

Or this will work to

alt text

So will this

alt text

Narg

capture.jpg (43.0 kB)
capture.jpg (35.1 kB)
capture.jpg (34.5 kB)
avatar image Rasa Apr 30 '15 at 11:41 AM

![alt text][1]

Yes Its stops error but wont work that variable values did get back from that BP [1]: /storage/temp/40825-error4.jpg

error4.jpg (49.5 kB)
avatar image Rasa Apr 30 '15 at 11:42 AM

alt text

error4.jpg (49.5 kB)
(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Don't think the Cast to BP2 is needed here. Doesn't the Get All Actors of Class (BP2) and the GET (0) give us the unique BP2 reference anyway? I tried a variant of the code above and was given a notice that the Cast was unnecessary. Removing it made no difference to functionality (see below): alt text

more ▼

answered Oct 25 '17 at 10:34 PM

avatar image

DoctorMikeReddy
0 1 1

(comments are locked)
10|2000 characters needed characters left
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