[Question] Line Trace blueprint errors

Hey! A while back I posted a question regarding Raytraces, I got helped and everything worked. Now I am trying to use it again however when I play the game it does not work. When I stop the simulation it gives me this error

“Accessed none ‘TraceTarget’ from node ExecuteUbergraph_MyCharacter in blueprint MyCharacter”

Anyone have an idea why?

Can you post that Blueprint setup?

Hey Evan,

Thanks for your question! As Satheesh has requested, would you mind posting a screenshot of your Blueprint setup?

Thanks!

-Steve

[Staff Edit: I fixed the links to the images temporarily]

Yeah sure, sorry I forgot about this :stuck_out_tongue: I will go ahead and post them

http://i.imgur.com/2lepDD8.png

That is the beginning of the shooting blueprint, here is the end

http://i.imgur.com/1I7M0CY.png

Hey Evan,

We’ll need you to remove these screenshots from imgur since they show aspects of the actual editor/tools–even if these are listed as private on imgur, they’re still accessible by moderators. If you can re-upload them as attachments on here, that would be great.

I’ve already taken a look at them as-is and will respond to your issue in a separate reply.

Oh! Right! Sorry, wasn’t thinking! I will take them off immediately.

Okay here are the two picures as an attachment

and he second one

Is your Character Blueprint based on a custom C++ class? Also, are you in a custom project or are you based in one of the Template projects?

The project is based in the first person template

For your TraceTarget Primitive Component, are you assigning that variable anywhere?

I was at one point, but I still got the same error, so I just undid it.

Then I suspect that TraceTarget is NULL when you’re trying to do a Line Trace Component with it, which is why you aren’t seeing anything happen when your Event fires. The error message is popping up after exiting PIE but it is also firing during PIE (you can pull up your Output Log via Window > Output Log and see the errors as they happen). You can also verify if it is NULL by doing a check before calling the Line Trace Component.

Okay, I thought it would set it to itself, but then I realized that a trace wouldn’t be able to start from a digital blueprint so I set it to a point yet that still did not work. I will try a few things with it then tell you if it did not work.

Okay, after quite a bit of experiementing I got it to work, it doesn’t work with a scene component however. Anyways, thank you guys! Just having one more problem, how would I get the Vector coordinates for a scene components? I will be using these to calculate the vector point the trace should end at, which I want to be a specific distance away from the tip of the gun (where i have a box component)

Hey Evan,

When you ask about the Vector coordinates for a scene component, do you mean the World Location? If you have a reference to that component in your Eventgraph, you can drag off that component variable node and use the Get World Location node.

Cheers,

-Steve