Hi,
I have a problem. I want to use an actor (transmitter) to activate another actor (receiver) with „Single Line Trace by Channel“. The activation of the other actor works, but as soon as I turn the actor (receiver) in the other direction, the „Single Line Trace by Channel“ from receiver doesn’t work properly anymore.
I want it to work like this:
Hey there @Godlike0207! As long as the trace is still making contact and still being polled, there shouldn’t be any issues with a simple setup as described. Could another collision be connecting?
May we see the blueprint?
The trace setup seems fine, I think your issue may lie with the material check. See if you can apply prints at the end of the branches, or since there’s so many endings here it might be best to put watches on the values of the == bbbbbb checks and a print whenever the casts fail. I’m guessing the material check is to make sure it only propagates the laser when it hits the “eye” of the receiver right?
Yes it works. Now I’ve discovered another problem. If two already activated receivers activate themselves again, an error occurs:
So in my opinion there’s a “proper” way to manage these cases, and a hackier way to do so. Most of the time I recommend the proper way, but that could be a decent amount of refactoring work.
So the last time I did one of these light puzzles I handled a circular logic issue like this by making an array of every light in the chain and made sure no other light could effect any other light in the chain. Basically just a quick for loop when making first contact with the light. However this poses a pretty large problem for your setup since you’re using Event tick. We don’t ever want to do a loop on event tick for obvious reasons.
In theory you could use a line trace by objects and add every light in the chain to the trace ignored objects. Then you wouldn’t need to iterate over the array every tick. If possible you could even have a “Manager” over the puzzle that handles that info.
1 Like
Many thanks for your help!
No problem! Thank you for the graphics! Makes it very easy to assist. If you have any trouble with getting an implementation for that set up, don’t hesitate to ask any questions!
1 Like