Cover system

Ok so i have the cover system i am making working thus far I need some tweaks to it yet to determine Height and so on, But my Question is when i tell it to cover and the character takes cover, as long as right mouse button is held the character needs to stay on the wall. How can i go about setting this up?

When I use a while loop or for each Loop or try to setup a sequence in my code i get an infinite loop error, What am i doing wrong? The gate works fine.

Hey Damien0410-

Where are you using your while loop? It looks as though you should be able to include a while loop just after the MultiGate to get the effect you want. Just make sure you as setting a bool variable to true when you click the right mouse button (bIsHeld) and then setting it to false when the button is released. then use that bool as the condition for your while loop. You will likely need a while loop for each of the outputs from your gate.

Cheers

Thank you for the response!!

Hmmmmm… maybe i am not understanding something here, so by logic that should repeat infinitely until button is released. However i get into the test after compile and save, and it only fires off the one time.

When i do this get the same action from before it is not registering the Boolean as PRESSED for more than One shot so once pressed it is released though it was never released Physically (it wont keep Detecting hit and teleport to that hit)

EDIT: If i do it as above the function never happens, if i go off the completed, it teleports to the wall but just one time till i click again

Hey Damien0410-

Rather than using a multigae, you could setup sequence nodes with the right mouse button pressed execution pin to then feed into your detect cover functions and use the released pin to trigger a “remove from cover” function. Alternatively, you could use a regular gate on Tick with your right mouse button pressed and released controlling the opening and closing of the gate. Depending on how you control going into and leaving cover will determine which method works best for you.

Cheers

Ok the second solution you said worked but only after switching from Line to Sphere trace, When i used the line, it would keep moving me backwards for some reason, and not stick to the wall still aprropriately.

So by changing this to the Sphere Trace it does exactly that! So your solution works, But when changed to Sphere from Line!

TYVM!!!