Beam and actor handling

Good Morning Guys,
I’ve a MotionController with a beam (trigger is hold down). That beam touch a actor (overlap it) and marked this actor. Now I want to unmark this actor if the beam no longer overlap this. This must workk with hold down trigger for another functionality next time. I try it with Event Tick to unmark actor. Thats works, but it’s too fast. The degub show "mark-unmark-unmark mark-…). Any idee how it work on another way?

Thanks!

So just to clarify things for myself, what you are doing is that you press trigger button and then the beam is thrown which marks an actor. For getting the actor you are using Ray Casting. What you want to do is that if you press the trigger button again, If the actor is marked already it should then unmark the actor. Is that right?

Hi, sry for the late reply.
I explain it in pseudo-code:
whie (trigger down)
show beam
if (beam touch actor)
mark actor
if (trigger not hold down longer)
//do something
if (beam untouch actor)
unmark actor
if (trigger not hold down longer)
spawn new actor

I hope you understand my problem.
Actually it works to show beam and mark actor. Now I want make the unmark.