[Solved] Removing Agility Attack Speed (--ISSUE:-- Animation Speed is still changed)

ISSUE (Initial - scenario that brought about ISSUE 2, which is what I need help with--- "solved" in "half solution"):

- Want agility to not change the attack speed of one SPECIFIC hero (not all of them, which would occur if i did it in constants)

HALF SOLUTION:

Trigger. Change the attack interval to be longer to match the bonus from agility

- Events : (map init, hero gains level)

- Conditions : is the hero I want (may be inside a unit-group loop if doing the map init)

- Action: (for attack interval = 1.15, just change that for desired interval)
Unit - Set Attack Interval of (Picked unit) to ((1.00 + (0.02 x (Real((Unit: (Picked unit)'s Integer Field: Agility ('uagc')))))) x 1.15) for weapon index: (0 + 0)

ISSUE 2:

This doesnt change the attack animation. Which is still sped up by the agility modifier...

REQUEST:

A way to reduce attack animation speed dynamically.


Changing their animation speed by trigger editor doesnt do anything ("Animation - Change Unit Animation Speed")

I have seen something to do with timescale when looking through similar posts, but i cant find a way to change that.

If someone has a better overall solution, thatd be cool. But the solution to the first half of the issue is nice enough, so just figuring out this second part should be enough

EDIT:

Changed timescale via:
Custom script: call SetUnitTimeScale(udg_Form1, 0.25)

The only animation it has changed is the speed at which Moving transitions to Stand (it didnt change move, just that specific transition between them in that order)

Looking into it further. This same thing is changed by "Animation - Change unit animation speed"


===========================

EDIT :
POSSIBLE SOLUTION

===========================


applying "slow" spell, does undo the animation speed change, as well as attackspeed. I just need to make it so this spell is permanent, and automatically applied, and has its data fields changed to match the attack speed increase

No idea how to do this though

I have got it so i add the spell to the hero, and make him cast it on himself, then removes it

but I dont know how to change the data field with the attack speed slow amount

In raw data, the field is "Slo2 (DataB1)"

what action lets me edit this? Would have thought it was "Ability - Set Real Level Array Field", but there doesnt appear to be anyway to actually use this action because the "RealLevelArrayField" is red, and opens an empty UI when i open it

when i tried "Ability - Set Ability Real Field", the only option it gives me is to change missile Arc...


EDIT: Figured it out, "Real Level Data Field". Not "Real Data Field" nor "Real Level Data Array Field"
--------------------------------------------------------------------------------


For anyone who finds this and needs it, here is an example of the trigger to auto apply this spell

Unit - Add SlowCUSTOM to (Picked unit)

Ability - Set Ability: (Unit: (Picked unit)'s Ability with Ability Code: SlowCUSTOM )'s Real Level Field: Attack Speed Factor ('Slo2') of Level: 0 to ((1.00 + (0.02 x (Real((Unit: (Picked unit)'s Integer Field: Agility ('uagc')))))) - 1.00)

Unit - Order (Picked unit) to Human Sorceress - Slow (Picked unit)


Then i added another trigger for when this spell is cast, that removes it after 1 second

Possible ISSUES:

- it wont work on a unit with spell immunity (I imagine)

- there may be ways to clear spell effects that would remove it? Maybe need to add a trigger for those that would reapply it?

- doesnt always get removed (specifically if in combat or already casting or ETC) .... isnt that big of a deal though if u make it so it can only target self. but it may not be getting re-applied (adjusted for new stats) if they dont cast the most recent version (perhaps there is a way to modify the buff on the hero rather than the spell directly?
 
Last edited:
Top