Hi guys, me and my team are trying to create a game like Twin Stick shooter but using WASD instead of the sticks.
However we found some problems that I hope you should help us to solve.
The Shoot Animation has an Anim Montage and he CharacterBP and the Weapon and Projectile have this Blueprints.
So, the problem is that when I press the Left mouse button it start the shoot anim as you see in the Video but when I release the button it have a little latency and it restart playing the shoot anim as a loop. How could I fix it? I want that when I press the left mouse button it shoots (also when I keep it pressed) and when I release it Stops.
Well the logic of the first BP does not really work all that well as it loops back on it’s self and looks like your trying to keep the idle alive with in the loop that occurs on the tick so a delay is not very useful
This kind of sequence that is delay dependent should be done during the animation update as part of the general event graph flow and “set” a var for each time the fire button has been pressed.
What would be more useful though is to see how you have the montage set up as to get it all to flow would require a anim notify or two.
Up please
I haven’t solved the problem because i don’t know how to use AnimNotify for this Attack.
Could someone explain me how to solve the problem with a screen?
Well I would say that the latency problem is caused by having your blend in and blend out set to 0.25 in the montage. Set both to zero and and it should be a lot more snappy.
The reason it keeps looping is because it “looks” like you have a nested argument that once triggered the loop will continue to play because “is Shot Arrow?” will always be true.
The logic block would be
Press key.
Branch reads “is Shot Arrow?” as true and switches it to false.
Branch plays montage.
Branch switches “is Shot Arrow?” to true.
Key unpressed
Montage is killed and “is Shot Arrow?” is set to false.
Not going to work as the action event of pressing a key activated the function and the “ SET is Shot Arrow?” is setting the branch condition back to true even though you try to set it to false when the key is released.
Logic wise.
Add “SET is Shot Arrow?” between Pressed and Branch and remove both “SET is Shot Arrow?” nested in the loop.
When the key is pressed the loop is activated until the key is released and the condition is set to false.
A bit redundant though as the function will continue to loop as long as you hold the key as you would kill the montage the moment you release the key.