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.
asked Jul 13 '18 at 04:22 PM in Using UE4
Follow this question
Once you sign in you will be able to subscribe for any updates here