Attack animation requirement

zoicelols

Member
I want my attack animation to only be able to be activated when no movement commands are active. So Idle + Use = Attack 1. Right now what happens when I try to set this up with parameters such as moving = false is I will be running or walking and then press the use ability and my character will not attack, which is what I want, but as soon as I stop running or walking the character will then activate the Use ability(Attack 1) because he is no longer moving which makes it apparent that it still activates the attack and is just waiting for moving to = false. I want the character to only be capable of using that specific attack while idle even though the player presses the attack while moving. Not used as soon as my character stops moving, but not at all because I used it WHILE moving. Moving + attack 1 should = the attack will never occur is my goal. How can I achieve this?
 
Last edited:
Just so I'm following, you have one animation defined within the Use Animator Audio State Set that has the Moving parameter set to false, and another that is set to true. Or do you not have any animations at all that should play when the character is moving?
 
I have one attack animation set off by pressing the use ability. It is set to play when moving is false and the attack use ability is pressed. So what happens is my character is moving. During movement I press attack and nothing happens until I stop moving. Then the animation will play.
What I want to happen is. When movement is occurring and I press attack, nothing happens even after I stop moving. I basically want the attack to never happen while moving or even after. Right now it holds on to the memory of me pressing the attack while moving and just waits until I stop before it actually animates.

What I need to happen is. If I am moving when I press the attack, it will not send anything to the animator unless I am sitting idle when I press attack.

So I want while moving ,left click(attack) and then afterwards I stop movement = dont attack because I attempted to attack DURING movement.

Currently it is character moving , left click(attack) during movement does not animate until I stop moving and then it uses the attack animation right when I stop. It needs to not be possible to use the attack if movement is detected.
 
Last edited:
Ah, right now that'll require modification within Use.CanStartAbility. The Use ability is starting, and it keeps trying until the condition becomes true and the animation can play.
 
Not home yet to check the script, but Im guessing i gotta change a loop to a one time check with if, then ?

How might you go about this personally?
 
Last edited:
Ah, right now that'll require modification within Use.CanStartAbility. The Use ability is starting, and it keeps trying until the condition becomes true and the animation can play.

Im not sure what to change when ive checked the code. I see the loop but im probably not reading it properly to understand how to edit to only check for the condition once and be done checking and reset. Could you help me out a little?

Or is there another solution? I just dont like how awkward it is for example when i have an attack activate on holding or pressing a direction and then a use click in that order from a combo timeout, yet if i click the use button before the movement command, it hangs until a movement command is pressed and then uses the attack. I want it to give up and reset if the command isnt used quick enough or if not used in the right order.

What im trying to accomplish within my character's animator state:
I have 4 attacks with different action ids linked to the same body item. Holding a direction and then pressing an attack will set off 1 of the attacks. If not holding a direction and i press attack, it should do nothing. Then when i hold a direction after pressing that attack that did nothing, i just want him to walk and not attack. Restricted to only attacking if currently holding down direction and pressing attack during. What would you recommend i do to set this up. What ive been trying so far is I have 4 new generic abilities that are linked to each one of the four direction with the long press button start type at 0.1 and have ability indexes that correspond to the animator to know when a direction is being held to activate the attack state. Then i have 4 different use abilities set up with combo timeout at 0.2 for one of each of the four directions plus fire1 for the use. Any advice?
 
Last edited:
I have this one written down to a future improvement but I haven't been able to get to it yet. I don't have any more steps to add it right now because I'm not exactly sure the best way to add it to CanStartAbility would be without some experimentation. I'll try to get to it for the next version.
 
I have this one written down to a future improvement but I haven't been able to get to it yet. I don't have any more steps to add it right now because I'm not exactly sure the best way to add it to CanStartAbility would be without some experimentation. I'll try to get to it for the next version.
Okay thanks alot justin. Really apreciated. Cant wait to see it in patch notes when its ready :)
 
Just giving you a heads up that I've implemented this for version 2.1.3. Now when no states are available it will not keep the use ability active.
 
Ohhhh ok so when the use ability is activated, but there is no way to transition without other specified input it will time out and restart?
 
The ability doesn't start when there are no states that are valid so you don't need to transition out.
 
Top