Page 1 of 1
Fire animation acting glitchy?
Posted: 31 Jul 2011, 04:50
by smoth
So I am working on some kick back anims:

nothing fancy, just something for fun.
Code: Select all
FirePrimary()
{
emit-sfx yellowbeammuzzle from flare;//first shot is actual weapon
sleep 50;
move right to z-axis [-0.4] now;
turn r_forearm to x-axis <-60> now;
turn r_arm to x-axis <15> now;
sleep 50;
turn r_forearm to x-axis <-45> speed [0.5];
turn r_arm to x-axis <0> speed [0.5];
move right to z-axis [0] speed [5];
Sleep 500;
}
but occasionally it does this:
WTF
That is a rotation as though I gave it a 0... it kicks DOWN for some reason. nothing in the code is a rotation below -45 yet occasionally I see it glitch this way. I should mention I don't use that smooth anim tag.
Re: Fire animation acting glitchy?
Posted: 31 Jul 2011, 17:13
by knorke
whats with the Sleep 500; at the end?
Re: Fire animation acting glitchy?
Posted: 31 Jul 2011, 17:37
by smoth
just 'cause.
Re: Fire animation acting glitchy?
Posted: 31 Jul 2011, 17:40
by FLOZi
You shouldn't really use [] around speeds for turning (use <>). Not that it will cause your problem
Re: Fire animation acting glitchy?
Posted: 31 Jul 2011, 17:41
by smoth
what is the difference?
Re: Fire animation acting glitchy?
Posted: 31 Jul 2011, 17:47
by knorke
smoth wrote:just 'cause.
dont know excactly how animation works but if every shot starts a FirePrimary() thread then the Sleep could cause that the old thread is still running when a new one starts.
they try to move the same pieces->funky.
Re: Fire animation acting glitchy?
Posted: 31 Jul 2011, 17:48
by FLOZi
smoth wrote:what is the difference?
The same as when used for the distance you are turning / moving...
Also agree with knorke, try dropping the sleep 500.
Re: Fire animation acting glitchy?
Posted: 31 Jul 2011, 18:31
by smoth
the last sleep didn't fix it.
emit-sfx yellowbeammuzzle from flare;
sleep 100;
move right to z-axis [-0.4] now;
turn r_forearm to x-axis <-60> now;
turn r_arm to x-axis <15> speed [0.1];
sleep 100;
move right to z-axis [0] speed [5];
turn r_forearm to x-axis <-45> speed [0.5];
turn r_arm to x-axis <0> speed [0.5];
fixed it but still doesn't explain why
Re: Fire animation acting glitchy?
Posted: 31 Jul 2011, 19:57
by FLOZi
Sure it was the speed change and not the increased sleeps? (1 frame -> 3)
Re: Fire animation acting glitchy?
Posted: 31 Jul 2011, 21:38
by smoth
unsure, I did both at the same time and then moved on
Re: Fire animation acting glitchy?
Posted: 31 Jul 2011, 23:32
by KDR_11k
[1] is 2.5 elmos (unless you changed your compiler to use 1 elmo instead), <1> is a 1┬░ angle. Giving speeds in <> notes them in degrees per second. I guess too high a rotation speed could mess with the rotation steps. [0.5] is 1.25 rotations per second, divide by 32 to get the increment per frame.
Alternatively it could be the weapon aiming animation interfering with the fire animation.
Re: Fire animation acting glitchy?
Posted: 01 Aug 2011, 02:12
by zwzsg
[..] multiply by 163840
<..> multiply by 182
That's the difference.*
* Technically, it depends on the constants you set in Scriptor, but I'll assume you use the usual ones