|
Post by ghosttales on Nov 13, 2018 22:10:31 GMT
Hello everybody,
So, I've just implemented a Parry and Riposte system, the idea is if you have successfully parried an attack, the enemy is briefly opened up for a special attack called a riposte (much like dark souls). The system works fine, but the problem is the button you have to press to riposte is "RB". So what ends up happening is, the riposte animation plays, the enemy gets riposted, but when you stop riposting, you just swing your weapon randomly because it shares the same button has the weak attack.
What function would I call to halt attacking/movement/actions? And what script is it located in?
My next question is about animations, specifically the idle animation. Where is it selected, and is there a system implemented that changes it depending on which weapon you are holding? If so, what script(s) and functions control it? Because what ends up happening currently, with my prototype weapons is that whilst I'm running the weapons crop through my shield and or legs. I have idle/running animations made for each of my weapons the straight sword, mace, dagger, halberd, spear and greatsword but I'm not sure where or how to implement them.
How do I change the idle/run animations of individual weapons so they don't crop through my shield/limbs while running?
Thanks in advance! I've been able to learn a lot just reading through the scripts in this add on. :^)
|
|
|
Post by shadex on Nov 14, 2018 7:13:01 GMT
Hello everybody,
So, I've just implemented a Parry and Riposte system, the idea is if you have successfully parried an attack, the enemy is briefly opened up for a special attack called a riposte (much like dark souls). The system works fine, but the problem is the button you have to press to riposte is "RB". So what ends up happening is, the riposte animation plays, the enemy gets riposted, but when you stop riposting, you just swing your weapon randomly because it shares the same button has the weak attack.
What function would I call to halt attacking/movement/actions? And what script is it located in?
My next question is about animations, specifically the idle animation. Where is it selected, and is there a system implemented that changes it depending on which weapon you are holding? If so, what script(s) and functions control it? Because what ends up happening currently, with my prototype weapons is that whilst I'm running the weapons crop through my shield and or legs. I have idle/running animations made for each of my weapons the straight sword, mace, dagger, halberd, spear and greatsword but I'm not sure where or how to implement them.
How do I change the idle/run animations of individual weapons so they don't crop through my shield/limbs while running?
Thanks in advance! I've been able to learn a lot just reading through the scripts in this add on. :^) Look into Melee Input (or Shooter Melee Input) to change the weak attack button.
All the animations are in the animator. Idle animations are in base layer under locomotion and are further split up between strafe and free locomotion. These are set by movesetID, which is on the weapons scripts. So you'll most likely want to create a new moveset for both free and strafe, and drop in all of that weapons idle and movement. Then make sure you set the weapons movesetID matches
|
|
|
Post by ghosttales on Nov 15, 2018 0:52:47 GMT
Look into Melee Input (or Shooter Melee Input) to change the weak attack button.
All the animations are in the animator. Idle animations are in base layer under locomotion and are further split up between strafe and free locomotion. These are set by movesetID, which is on the weapons scripts. So you'll most likely want to create a new moveset for both free and strafe, and drop in all of that weapons idle and movement. Then make sure you set the weapons movesetID matches
1. I do not wish to change the weak attack button, I was thinking more of setting up a function to block attacks whilst doing a certain animation. Are there any public functions for this? If so which script(s) are they located in :^) 2. Thank you! Will do. Appreciate the assistance! :^)
|
|
|
Post by shadex on Nov 16, 2018 17:03:55 GMT
Look into Melee Input (or Shooter Melee Input) to change the weak attack button.
All the animations are in the animator. Idle animations are in base layer under locomotion and are further split up between strafe and free locomotion. These are set by movesetID, which is on the weapons scripts. So you'll most likely want to create a new moveset for both free and strafe, and drop in all of that weapons idle and movement. Then make sure you set the weapons movesetID matches
1. I do not wish to change the weak attack button, I was thinking more of setting up a function to block attacks whilst doing a certain animation. Are there any public functions for this? If so which script(s) are they located in :^) 2. Thank you! Will do. Appreciate the assistance! :^) Not really sure what your going for here. From my understanding i'm guessing you want to hit RB to preform the Riposte, then hit weak attack to deliver a special blow, but not trigger the regular weak attack? So the problem is the animator doesn't know when to use regular attack and weak attack right?
I would make your Riposte code have a Bool that gets sent to the animation like animatorRefrence.SetBool("boolname", true) and after X seconds (like a cooldown) flip it back to false. In the animator create a parameter that is a bool that is exactly the same name as the bool your sending to the animator. Now in the animator, where the transition from Riposte to RiposteAttack (where you were trigger weak attack) add both the Weak Attack and the bool you just made to the conditions for the transition. Make sure the bool condition is set to true.
Now when you Riposte, the bool in the animator should flip, and flip back when your cooldown is done. If you use a weak attack WHILE the bool is flipped, you will preform the Riposte attack. Personally i also like to add a exit condition from the Riposte state that if the bool turns false, it exits the state. This will be useful later on if you decide to have certain things canceling Riposte, as all you have to do is flip the Riposte bool. I would check out the IsBlocking bool in vTPC if you want a reference.
|
|
|
Post by uberwiggett on Nov 17, 2018 5:02:25 GMT
shadex not quite, what he wants is when you block an attack, it activates a generic action on the enemy called riposte, but he wants the riposte button to be RB, so he needs to know what to do in order to disable RB as weak attack ONLY IN THE INSTANCE that the riposte option is available. I might have partly answered it above about generic action, perhaps if the action is activated as an option it could alter the inputs for weak attack to free up the button, then set it back once deactivated. That's if he is using generic actions
|
|
|
Post by shadex on Nov 17, 2018 19:51:22 GMT
shadex not quite, what he wants is when you block an attack, it activates a generic action on the enemy called riposte, but he wants the riposte button to be RB, so he needs to know what to do in order to disable RB as weak attack ONLY IN THE INSTANCE that the riposte option is available. I might have partly answered it above about generic action, perhaps if the action is activated as an option it could alter the inputs for weak attack to free up the button, then set it back once deactivated. That's if he is using generic actions Answered above where? I don't see him talking about Generic actions... am i missing forum posts? or is this part of another thread?
I suppose you could try SetLockMeleeInput(bool value) on vMeleeCombatInput, and attach it on the OnPlayerEnter() event and enable the Melee Input Lock, then disable it on OnPlayerExit() event. I don't like that answer though, as it's bad design for a riposte system IMHO. It's much to easy to break, and eventually you are going to want to flush out the system and add additional animations (multiple Riposte animations). But it's a quick way if you want to get a quick PoC. It also doesn't offer any control over the window Repsoite is open. Maybie the OP already has that solved though.
|
|
|
Post by uberwiggett on Nov 18, 2018 4:05:14 GMT
Sorry for the confusion, i was providing an example of how it could work with generic actions, and by above my meant my previous paragraph. What I am saying is he already has the riposte action sorted, but the issue he is having is that by pressing the RB button he activates the riposte but also weak attack at the same time. He wanted to know how to turn off the weak attack input just for the instance that a riposte was available.
|
|
|
Post by ghosttales on Nov 19, 2018 22:48:37 GMT
1. I do not wish to change the weak attack button, I was thinking more of setting up a function to block attacks whilst doing a certain animation. Are there any public functions for this? If so which script(s) are they located in :^) 2. Thank you! Will do. Appreciate the assistance! :^) Not really sure what your going for here. From my understanding i'm guessing you want to hit RB to preform the Riposte, then hit weak attack to deliver a special blow, but not trigger the regular weak attack? So the problem is the animator doesn't know when to use regular attack and weak attack right?
I would make your Riposte code have a Bool that gets sent to the animation like animatorRefrence.SetBool("boolname", true) and after X seconds (like a cooldown) flip it back to false. In the animator create a parameter that is a bool that is exactly the same name as the bool your sending to the animator. Now in the animator, where the transition from Riposte to RiposteAttack (where you were trigger weak attack) add both the Weak Attack and the bool you just made to the conditions for the transition. Make sure the bool condition is set to true.
Now when you Riposte, the bool in the animator should flip, and flip back when your cooldown is done. If you use a weak attack WHILE the bool is flipped, you will preform the Riposte attack. Personally i also like to add a exit condition from the Riposte state that if the bool turns false, it exits the state. This will be useful later on if you decide to have certain things canceling Riposte, as all you have to do is flip the Riposte bool. I would check out the IsBlocking bool in vTPC if you want a reference.
Got it all sorted! Thanks pal :^)
|
|