Abilities that represents direction movement

zoicelols

Member
I have 4 generic abilities set up each representing a direction in movement. w = Forward, s = Backward, d = Right, a = Left. I tried to have these abilities' stop type be button up, but all of these have a default stop event that I don't know how to disable. I don't want these abilities to be stopped by a timer or an event. I want them to be only stopped by releasing the button meaning I'm no longer moving in that direction because I use these abilities and their ability index to determine what animation states can play based on directional input. Right now with my setup of w = ability index 101, I will for example hold down w to move forward and the logs will read that the ability index is bouncing between 101 and 0 so rapidly. I have it set up with a start type of long press and a stop type of button up. The long press duration is set at 0.01. The reason I use these directional detecting abilities is because I'm trying to set up input for the animator state. If I am holding forward and I press left click, it will use a different attack. Same goes with each different direction which is 4 different attacks. So a problem I am getting right now is that with the ability index rapidly switching between 0 and 101 for a forward input ability, even though my character is moving forward and presses left click, it sometimes won't be timed correctly and the left click will land on a 0 ability index which makes the attack not go off. Now if the ability was always an index of 101 as long as I was holding down w key and never went to 0 unless I released the w key, then this attack would always work as intended.

Is there another way to accomplish this task? I can't seem to figure out how to solve this problem.
If I hold a specific direction and then left click, then use attack.
 
If the ability index is rapidly changing then the ability is probably starting and stopping within the same frame. It's tough to follow along with your setup but if you have an ability that starts with a button down and stops with a button up then that ability should only remain active for as long as that button is down.
 
Top