|
Post by hobbycoder on Jan 9, 2020 0:53:59 GMT
Hi Invector..Happy New Year! I'd just like to ask if there's a plan to add attack speed property on the vMeleeWeapon?
So that, when a character is holding a heavy weapon, we have the option to reduce it's animation speed to whatever value we like..For example, 0.8 on heavy weapon, 1.2 in light weapon, 1.0 on regular weapon.. then this property can be accessed via meleemanager so when we implement stats system, we can add modifier to the attack speed property..Like when agility is increased, attack speed will have a multiplier - Weapon Attack Speed + (0.02 * Current AGILITY) ..
Thank you.
|
|
|
Post by Invector on Jan 9, 2020 12:03:52 GMT
Pretty nice feature, thanks for the suggestion!
I will think of something and see if there is room to add this feature in the next update
|
|
|
Post by hobbycoder on Jan 9, 2020 13:12:02 GMT
Thanks. Looking forward to it..=)
|
|
|
Post by shadex on Jan 9, 2020 19:02:56 GMT
Hi Invector..Happy New Year! I'd just like to ask if there's a plan to add attack speed property on the vMeleeWeapon?
So that, when a character is holding a heavy weapon, we have the option to reduce it's animation speed to whatever value we like..For example, 0.8 on heavy weapon, 1.2 in light weapon, 1.0 on regular weapon.. then this property can be accessed via meleemanager so when we implement stats system, we can add modifier to the attack speed property..Like when agility is increased, attack speed will have a multiplier - Weapon Attack Speed + (0.02 * Current AGILITY) ..
Thank you. There is a big problem with doing that. Any momentum based attack will really look bad at higher or slower speeds. Since most animations are full body, it feels like time is slowed, but not the player. Pretty much anything that requires gravity. Anyways, here is a solution:
In the animator, make a float called "Attackspeed". For each attack state, check the "Multipler" box and select your float. Make a script that access's the players animator, and SetFloat("AttackSpeed", attackSpeed"); and run that everytime someone equips/unequips a weapon. You can put your formula here, like if you wanted str or dex to contribute. Further more, you can use that variable for a ton of other things to slow down their attack. Like fatigue, or a slow attack spell. Hope that helps
|
|
|
Post by deidrereay on Jan 9, 2020 19:44:59 GMT
Shadex that sounds pretty rad. You have any scripts doing like that we could look through at all? would be cool to see i.e poisoned slow down an enemy or a players attack speed I think !!
|
|
|
Post by shadex on Jan 10, 2020 6:52:18 GMT
Shadex that sounds pretty rad. You have any scripts doing like that we could look through at all? would be cool to see i.e poisoned slow down an enemy or a players attack speed I think !! Unfortunately my code is pretty far from Vanilla, and wouldn't be of much help. but i already pretty much gave you the code. setup the animator like i said, then make a new script, throw it on the weapon. Make a variable called attackSpeed, which is what the weapons attackspeed will be set to. On start() put this logic in: Animator.SetFloat('AttackSpeed', attackSpeed); and there you go.
If you support holding weapons in the offhand, you'll need to check with the melee manager if the weapon is in the right hand before setting the attackspeed. Since you don't want offhand weapons overwriting the primary weapons attackspeed.
|
|
|
Post by hobbycoder on Jan 11, 2020 10:18:41 GMT
At Shadex, thank you very much for the idea..I haven't thought about the multiplier in the animator..I understand what you mean.. Thanks again..=)
|
|