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"

Trace hit results error of none accessed


I followed this tutorial's top comment on creating a ladder in the FPS template.


It is working great but there is one issue in the code, it throws a none accessed error on the line trace if I'm not in front of my ladder. I'm not sure what type of check I can place in there when it is not hitting any surface.


First person BP:


Error thrown when not looking at my dummy ladder:

alt text

Product Version: UE 4.13
hiterrors.png (44.7 kB)
bpladder.png (176.0 kB)
errorthrownhere.png (114.5 kB)
more ▼

asked Nov 07 '16 at 06:39 PM in Blueprint Scripting

avatar image

388 9 14 20

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

1 answer: sort voted first

Yes, the problem is that you trying to access the return actor without verifying first that it actually exists. What you need to do is have an extra branch that first checks if the line trace actually found something and then you do the check for the has tag and the is falling. If the line trace doesn't find something, i.e. you looking at the sky then the hit result will contain null values and so you are trying to use those values even when they are null.

Something like this:

alt text

Hope this helps! :D

Edit: I just noticed that the first condition in your AND actually is the return boolean from the line trace. I'm not actually sure if Blueprints behave exactly like written code in this matter, where if the first condition evaluates to false then it doesn't check the other 2 conditions. If that's the case then the problem should be something else. Please try what I did and tell me if that solves it, if not, I'll try to do some tests.

linetrace.png (181.2 kB)
linetrace.png (181.2 kB)
more ▼

answered Nov 07 '16 at 10:02 PM

avatar image

722 19 6 26

avatar image jimd667 Nov 07 '16 at 10:21 PM

That was it, Thank you!

for anyone else out there here is the modified code I have, no error is shown and it runs smoothly.

alt text

newbpcode.png (203.9 kB)
(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