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"

Problem comunicating variable from one blueprint to another

Hello,

I'm trying to send the variable Hunger from my character blueprint to my actor blueprint ( food ) to calculate food value + hunger but i'm getting an error i don't understand.

alt text

alt text

What am i doing wrong? any other way to do it?

Product Version: Not Selected
Tags:
screenshot_1.png (26.2 kB)
screenshot_2.png (198.2 kB)
more ▼

asked Jun 12 '14 at 07:38 PM in Blueprint Scripting

avatar image

Bio90
11 1 2 6

(comments are locked)
10|2000 characters needed characters left

3 answers: sort voted first

After taking a break and cleaning my head, i managed to solve this my self, for those who will have the same problem, this is how i fixed it:

Instead of using Reference variables i got a player character node, cast to my character and got the variable from there.

alt text

screenshot_4.png (147.6 kB)
more ▼

answered Jun 12 '14 at 08:04 PM

avatar image

Bio90
11 1 2 6

avatar image robbiecooper Jun 12 '14 at 08:18 PM

Good stuff, glad you sorted it :)

(comments are locked)
10|2000 characters needed characters left

ok I think the problem is youre not casting to the character youre trying to reference it.from your charref pull off the wire then add casttoxxxxchar.

more ▼

answered Jun 12 '14 at 08:04 PM

avatar image

DJMidKnight
1.2k 50 24 50

avatar image Bio90 Jun 12 '14 at 08:05 PM

yup, indeed that was the problem, thanks for the answer :)

(comments are locked)
10|2000 characters needed characters left

You could cast to your character bp.

Try and separate things up a bit more. In order to do a cast to character you have to be able to access that node. Would it be possible to use a trigger volume instead of begin cursor over? A trigger volume would have the other actor variable that you can drag off and use to do a cast to character?

Once you've done that, you could use a custom event in the character bp, that you access from Food_PH? That might help in spreading things out a bit- just looking at your bp's it looks like you're accessing the hunger value almost at the same time as setting it.

more ▼

answered Jun 12 '14 at 08:17 PM

avatar image

robbiecooper
756 79 60 233

(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