Line Trace check

Hi, I need to know how to make the line trace to recognize an ai character but I’m stuck. Here’s my blueprint.

(Amateur here, but… ) You used everything you needed, the only problem is that you think a bit differently than the Engine. This is how it should work:

  1. The Line hits an Actor. (LineTracByChannel)
  2. Get that Actor. (Hit Actor)
  3. Check if it’s an AiCharacter (put that Hit Actor into the Object variable at the Cast To AiCharacter)
  4. If it goes forward through Cast Failed then it wasn’t one.

In this particular case where you only need that bool, or in cases when you are almost completely sure that the cast won’t fail, do this:

Right click on the “Cast to (…)” and choose “Convert to pure cast”. It won’t need an Execution pin (the white triangle) it will be faster, and it will give you a boolean variable that tells you if the conversion was successful or not.

This is how I would approach this issue. You need to check first if there is a hit at all, then you need to check if the hit is an AI. Btw your cat node will not work as it has nothing connected to it’s object input.

(Sorry for off topic, deleted since I got reply)

Hey, I never made a multiplayer game before, but you should post this as its own question on answerhub with a few screenshots. For your project you can go to File>Package Project>Zip Up Project, this will make a small zip file of the entire project, then upload it to one drive. Then send me the link vi Private message by going to my profile on the forums. I can’t promise you an answer since I never made a multiplayer game, but I can check it out anyway.

Tried to message you.

fixed that with your method, thank you all same :smiley: