A certain build in my game would look cool as hell if it had a choppy animation. But I want choppiness to affect all its animations. Is there a hacky solution to doing this?
bump because i moved it to scirpting support
i looked at this problem and thought âoh this solutions really simpleâ
im writing this purely for people who want a jittery effect without setting their animations to constant
in the animation editor. many others would probably want this effect in their games and ideas, and i would love to see it. my game was going to have a âDollâ build, where the character moves very robotically and jittery. i would like to see this animation-style crossover with regular smoothened animations, or potentially even a game consisting only of jittery movements.
the solution is to have a custom play function which starts and stops the animation with some intervals of time, call it :PlayJitter(jitterInterval, fadeTime, weight, speed)
(i wouldnât know how to start and stop the fadetime and whatnot, but im pretty sure its just the time it takes for the weight to go from 0 to weight
so you can just do a lil math with os.clock and math.min ifykyk)
and you can have a :StopJitter(fadeTime, weight, speed)
which stops said interval
local jittering = false
local function playJitter(interval)
jittering = true
task.spawn(function()
while (jittering) do
animation:Stop()
task.wait(interval)
if (not jittering) then break end
animation:Play()
task.wait(interval)
end
end)
end
local function stopJitter()
jittering = false
animation:Stop()
end
heres a very barebones version of my idea. note that this code will cause a lot of bugs unless properly handled
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.