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"

Passing Item location into Main Menu Blueprint

I have created a simple AR game to spawn an Asset based on the players view location. item_location is the object i use to determine where i want the asset to appear in the game. I created this by following a video tutorial.

alt text

I then use this location in the event graph as follows: alt text

This all works fine. But after adding a main menu and trying to call this procedure from the "start button" click, the item_location i am using gives me an error: alt text

I presume this is because "item_location" is unknown within this blueprint. I am wondering how i can pass this information between blueprints?

Thanks ☺

Product Version: UE 4.19
Tags:
more ▼

asked Apr 22 '18 at 03:18 PM in Using UE4

avatar image

LeeCheeseman
1

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

2 answers: sort voted first

Looks like you just copy/pasted that variable into your widget. You can't do that. Those blueprints are different and as such it is like speaking a foreign language to your widget. You need to make the "translation" so to speak. You can do this by getting a reference to the BP_ARPawn actor in your level within the widget. So if that is your player character I would go into my widget, off event construct "cast to BP_ARPawn", then off the input object pin drag off and say "get player character", now you have a reference to the player character. From that output cast pin, drag off and say "get item location". That will pull in the actual reference of "item location" from your player character. You can then connect the other pin of "item location" to the transform.

more ▼

answered Apr 22 '18 at 06:46 PM

avatar image

Nebula Games Inc
5.4k 28 9 15

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

Thanks for the help. I feel like we are almost there. But it seems to be giving me an error.

See attached screenshot: alt text

main-menu-error.png (449.8 kB)
more ▼

answered May 02 '18 at 04:56 PM

avatar image

LeeCheeseman
1

(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