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 variables from one blueprint to another

Hi!

I have recently started to learn the blueprint system. So, sorry if this question sounds a bit obvious, but I have been trying to figure this out for quite some time.

I am not trying to do anything specifics, but to make it work.

I have created a variable Apples (Int) with a default value of 3 in the MyGame blueprint and I made it public.

I am trying to access it from the MyCharacter blueprint. In the end, I get the failed message, but I'd like the number 3 to appear on screen.alt text

I am really not sure what I am doing wrong. Thank you.

Product Version: Not Selected
Tags:
mycharacter.jpg (202.0 kB)
more ▼

asked Feb 22 '15 at 12:14 AM in Blueprint Scripting

avatar image

Deylt
10 1 2 4

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

1 answer: sort voted first

Casting is a funny thing, there's so many things that can go wrong. What I would suggest you do is in the "MyGame" blueprint, casting to the MyCharacter blueprint via "Get Player Character > Cast to MyCharacter" (Using the get player character node to create the "Cast to My Character" and then setting the MyCharacter's Apples to the same amount as the apples in the "MyGame" blueprint.

alt text

01.jpg (183.7 kB)
more ▼

answered Feb 22 '15 at 01:22 AM

avatar image

KITATUS
2.3k 98 84 398

avatar image Deylt Feb 23 '15 at 04:14 AM

Thank you for your answer. It's really appreciated. :)

(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