function modifier_wk_throne:DeclareFunctions()
return {
MODIFIER_PROPERTY_OVERRIDE_ANIMATION,
MODIFIER_PROPERTY_OVERRIDE_ANIMATION_RATE,
MODIFIER_PROPERTY_TRANSLATE_ACTIVITY_MODIFIERS
}
end
function modifier_wk_throne:GetActivityTranslationModifiers()
return "wk_sk_arc_taunt_throne"
end
function modifier_wk_throne:GetOverrideAnimation()
return ACT_DOTA_TAUNT
end
function modifier_wk_throne:GetOverrideAnimationRate()
return 1.0
end```
but it doens't work on creature with WK model, it works only on hero when I add this modifier to WK.
#How to play taunts on creatures?
1 messages · Page 1 of 1 (latest)
Thats probably because hero has additional activity modifiers based on movement speed, attack speed, etc and taunt uses them too. If this is a case then you need implement attack/movement speed & etc activity modifiers for non heroes yourself (they defined in hero kv)
I don't get it too much... these activity modifiers
I check that wk hero has this:
"MovementSpeedActivityModifiers"
{
"walk" "0"
"jog" "0"
"run" "360"
}
What does it mean? Is this equivalento of MODIFIER_PROPERTY_TRANSLATE_ACTIVITY_MODIFIERS in lua?
why walk is 0?
what mean these numbers
is there some tutorial for that? 😄
now I changed model to WK arcana and this model doesn't even have walking animation 😦
I tried to return "wk_sk_run" in GetActivityTranslationModifiers() but it doesnt help
ehh I return "run" and now it works, they have walking animation, I don't see any sense .... 😦
ok, so if GetActivityTranslationModifiers return "haste" is something like GameActivity + "haste" if current activity is ACT_DOTA_RUN it will be ACT_DOTA_RUN + haste, yes? And if model has this animation it will be used. But where can I find these animations? how can I know that this WK arcane model has ACT_DOTA_RUN + run and I should use it?
and what mean these animation names on WK arcana model, for example wk_sk_run should I use them somehow?
Ignore wk_sk_run (sequence name) and rest, all you need to play animation is activity name (ACT_DOTA_RUN) and sometimes activity modifiers ("walk", "jog", "run", "haste", etc). Every model have unique set of activity modifiers. You can't play animation by sequence name because api for that broken. Dota selects animation to play based on required activity name and current unit activity modifiers (if any). Unit can have multiple activity modifiers at once(run + haste + fast, etc), MODIFIER_PROPERTY_TRANSLATE_ACTIVITY_MODIFIERS can apply only one activity modifier per dota modifer (way to apply multiple activity modifiers per modifier not exists or unknown for me).
In old model editor it was obvious how it works because every animation was displayed like wk_sk_run_copy [ACT_DOTA_RUN+run] or wk_sk_run [ACT_DOTA_RUN] (sequence_name [activity_name+modifier1+modifier2+...+modifierN], but in new model editor they forgot implement display of activity modifiers for every animation. If you want to know activity modifiers for your model animation then you need to guess or load/decompile this model in VRF and search in opened/decompiled files (no idea how it defined in decompiled files, but this is best you can do)
Not sure why both walk and jog are 0, but basically if the hero has at least that much movespeed then they will have that activity translation applied to them.
So in that example between 0-359 movespeed they would either get "walk" or "jog", or maybe both im not sure.
But at 360+ movespeed they would get "run"
The same thing also exists for attackspeed if you look at the hero kv.
thx guys for explanation this, now I think understand it much better 😄