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"

Blueprint runtime error

I am having an issue with a simple variable and get the error "BP runtime error: Accessed none trying to read property shop keeper REF from function 'executeUbergraph_Thirdpersoncharacter' from node branch in graph eventgraph in object third person character with description. accessed none trying to read property Shop keeper REF.

WHAT I AM TRYING TO DO- I am doing a third person game with third person template. I have an NPC shop keeper character (shop keeper REF is its blueprint) and obviously my own character (third person character BP). I am trying to set it up so when i'm near the shop keeper and press a button one widget shows, and when i'm away from the shop keeper a different widget shows. On the most part i already have it working except for one simple BOOL variable.

THE ISSUE- I have my shopkeeper all set up with collision sphere with the "on begin" and "end overlap" functions. I know this is working correctly as i also have a separate widget that shows his name when i get close to him and vanishes when i walk away. Anyway in the shopkeeper BP i created a bool variable called "is shop in range?" i have made it editable and exposed on spawn. The default value is un-ticked. On component begin overlap i set "is shop in range?" to be ticked (true) followed by setting my name widget to visible.

On component end overlap i have set "is shop in range?" to un-ticked (false) followed by setting the name widget to hidden. On event beging play i also had to set "is shop in range?" to false as even though the default value is false it kept starting as true. I have tested that the bool works in PIE by having the shop keeper actor selected in the world outliner and i can see that it sets to true when i get close and false when i walk away as does my name widget.

In my third person char BP i have the shopkeeper BP reference in the variables. I have created a keyboard button "I" event going straight to a branch. For the condition of that branch i dragged in the shopkeeper REF (get) and then called the "is shop in range?" BOOL and connected that to the condition. That is what is causing the above error and i cant figure out why.

If i unplug the bool from the condition and use the true or false tick box then both widgets will show as they should but obviously i can only have the one or the other as with the tick box it is either JUST TRUE or JUST FALSE its not dynamic like it should be with the bool.

any help would be massively appreciated. am i just wrong in the way i have set up the bool, is it a bug is it fixable? ive tried so many things even deleted it and tried again but cant for the life of me work it out.

Product Version: UE 4.19
more ▼

asked Jul 13 '18 at 04:22 PM in Using UE4

avatar image

16 1 4 8

avatar image mattyi85 Jul 16 '18 at 08:19 AM

I have managed to do a temporary workaround. in my third person BP i have an "event tick line trace" used for showing actor name widgets when i look at them at the end of that i have added some bits.

From the Hit actor i have cast to the shopkeeper BP off the main execution i have done an is valid check from the is valid i have set a bool to true. The is not valid i have left blank but from the cast failed i have set the bool to false. I then call that bool on my "I" button pressed and it works when i am looking at the shopkeeper and in range it will show the shop widget if i am looking away it brings up the inventory widget.

I would still much prefer to have it running from the shopkeeper collision overlap though so would still greatly appreciate any help if it is possible.

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

0 answers: sort voted first
Be the first one to answer this question
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