Flashlight with cone tracer

your print string isnt connected to anything so it wont work, it needs the exe pin (the white one) connected otherwise it wont ever be activated.

the variable picture doesnt tell me much other than that its a static mesh and its name. which is fine.

as for the collision you want to have it set to either project default or “simple and complex” for now. try using a box collision for now instead of the mesh. so we can eliminate a few variables before tackling if theres issues with the mesh.

not sure if itll help but heres a updated picture of the script i have and the collision settings of the sphere collision im currently using. ive modified the script to run once when the button is initially pressed as well so its easier to test with. i also added in the print string so you can see where to put it.

Ok, I guess is now working. I’ve replaced the cone with a box collision

Im playing with 2 screens, one is the Zorro (Main Player) and another is the Ghost. When I press G, there is a print that says 0 like in your message and that means that isn’t working, but when the Ghost enter to the box collision radius it works and prints 1 and the loop works, but there isn’t any tracer, so that means that is working and the cone was correctly working all the time, but tracers doesn’t exist.

So, I tested again with a cone and it works, when the ghost is behind a wall and the cone is hitting it prints: ‘nohit’, so that means the blueprints worked. So… the problem was that I don’t understand the system and I ever guessed that here’s going to be a magic line when im pressing G and if that line hit the ghost the ghost losses life, and not a system that need to detect the ghost to do the tracer (Wich is a lot more effective and more game-optimizing). The line doesn’t appear, but I guess the result is the same.

Thank you a lot, you’re a good person, you helped me a lot, I’ve checked you ‘correct awnser’ early and you still replying me, the community needs more people like you. You are working on Epic Games or something?

http://prntscr.com/iyzca8

as long as the length of the array is greater than 0 then you should have the line trace happening its weird if its not.

the basics of the code is it first checks are there any actors i care about in range, if no then do nothing and the script ends, if there are actors in range then it goes on to the line trace which is basically asking ok can i see the actor from where i am, if no then not hit, if yes then target hit. well i should clarify a bit on this last part, its really asking is there anything blocking my vision to the target actor thats why the branch at the end can be a bit confusing.

in your third paragraph you mention the overlap for game optimization which isnt really the reason for it, i used the overlap to get a reference to the target actors. basically if you tried to only use a line trace how would you know where to set the end without already knowing the location of what your looking for. it is better for optimization in a way buts its also easier to get actors that are close. other people would jump straight to all actors of class but why get everyone in the level, just seems silly to me.

as for the last bit thank but no i dont work for epic im just a hobbyist i dont work in the games industry or even the computer industry haha. just glad i could help out. let me know if you end up needing more help on this one.