how to pause root animation from playing continuously?
by Ahsan Muzaheed · in Torque 3D Professional · 04/09/2012 (12:10 am) · 10 replies
i was trying to do this:
after an shotgun heat my aiplayer will be on ground.but not dead.
after about 20s i will play an animation as an transition between ground to STAND mode.
but after playing stnad To Ground animation,
engine consider aiplayer is in idle mode
and
start to play root animation.
as a result aiplayer stand up
and
start to play root animation.
so only one solution in my head is to stop engine's action on player's movement mode.
how to do that?
or any alternative way?
after an shotgun heat my aiplayer will be on ground.but not dead.
after about 20s i will play an animation as an transition between ground to STAND mode.
but after playing stnad To Ground animation,
engine consider aiplayer is in idle mode
and
start to play root animation.
as a result aiplayer stand up
and
start to play root animation.
so only one solution in my head is to stop engine's action on player's movement mode.
how to do that?
or any alternative way?
About the author
Torque 3D enthusiastic since 2010.Have been working in several T3D projects besides of Unreal Engine 4 and Unity 3D. NEED a hand with your project? SHoot me a mail. http://www.garagegames.com/community/forums /viewthread/138437/
#2
it is my aiplayer's root animation.
animation from it's datablock:
any idea to stay it down on ground for 5-20 second?
04/09/2012 (6:00 am)
no.it is my aiplayer's root animation.
animation from it's datablock:
function MegaZombieDts::onLoad(%this)
{
.
.
.
.
.
%this.renameSequence("root2", "root");
}any idea to stay it down on ground for 5-20 second?
#3
Not the most elegant thing, I know, but it might work....
04/09/2012 (12:33 pm)
Maybe make a "lay on ground" animation - a short looping lay and do nothing animation that you can play for the duration of your "stun".Not the most elegant thing, I know, but it might work....
#4
so i have to make another animation by taking only the laying down animation.and play it through the time i want it to be on ground.
when animation will be finished then engine will automatically take the aiplayer into idle position.
but how can i play animation for an specific time?
suppose,my animation is for 3sec.
but i have to play it through 15 sec.
how to do that?
i am using this to play that animation:
%obj.setActionThread("getDown",false,false);
04/09/2012 (1:14 pm)
@richard,so i have to make another animation by taking only the laying down animation.and play it through the time i want it to be on ground.
when animation will be finished then engine will automatically take the aiplayer into idle position.
but how can i play animation for an specific time?
suppose,my animation is for 3sec.
but i have to play it through 15 sec.
how to do that?
i am using this to play that animation:
%obj.setActionThread("getDown",false,false);
#5
The second parameter should be the "hold" flag.
That should tell the system to hold that animation. When you're done lying down, call setActionThread() again with your idle, or whatever animation you want next.
Otherwise, you could maybe make an animation as long as you would possibly need (whatever your maximum duration would be) and then interrupt it if the duration is actually shorter (say, if it was a random duration).
If you wanted to stretch a single animation to fit an arbitrary time length you would probably have to modify the engine to expose a time scale variable like iTorque uses - you can stretch or speed up an animation arbitrarily by changing the timescale for the animation that way by dynamically changing the playback speed. But that's a source change....
Sorry I'm not more help - I'm just guessing here, throwing some ideas out.
04/09/2012 (2:03 pm)
Try %obj.setActionThread("getDown", true, false);The second parameter should be the "hold" flag.
That should tell the system to hold that animation. When you're done lying down, call setActionThread() again with your idle, or whatever animation you want next.
Otherwise, you could maybe make an animation as long as you would possibly need (whatever your maximum duration would be) and then interrupt it if the duration is actually shorter (say, if it was a random duration).
If you wanted to stretch a single animation to fit an arbitrary time length you would probably have to modify the engine to expose a time scale variable like iTorque uses - you can stretch or speed up an animation arbitrarily by changing the timescale for the animation that way by dynamically changing the playback speed. But that's a source change....
Sorry I'm not more help - I'm just guessing here, throwing some ideas out.
#6
Thanks for the info on this. That time scale feature would be a good one to hack. It brought up the image of battles in FFX where a haste or slow spell is cast on a character and their animations get significantly faster or slower. It is a really cool effect.
I love changing timescale stuff. I played with it in TGE and in mods for Oblivion. Oblivion is cool because you can catch arrows out of the air.
04/10/2012 (12:35 am)
@Richard,Thanks for the info on this. That time scale feature would be a good one to hack. It brought up the image of battles in FFX where a haste or slow spell is cast on a character and their animations get significantly faster or slower. It is a really cool effect.
I love changing timescale stuff. I played with it in TGE and in mods for Oblivion. Oblivion is cool because you can catch arrows out of the air.
#7
04/10/2012 (6:33 am)
Oh, there is a timescale variable in the system but it sets the speed for the entire simulation. Basically it does exactly what you see in Oblivion and Skyrim with the slow-motion cut scenes for critical hits - you can speed up or slow down the whole simulation. I was just thinking that it would be cool to make this apply to individual animations like it does in iTorque.
#8
from franks's old thread:
Usage:
$timeScale = 0; // stop time
$timeScale = 1; // normal time
$timeScale = 20; // your world just got a lot faster
$timeScale = 0.1 // slowwww dowwwwn
There is also:
timeAdvance
This works for slowing down, but zero causes normal time flow. WIll not stop time.
I do not know if these affect networking, they do not slow down wave files.
04/10/2012 (7:20 am)
Quote:Oh, there is a timescale variable in the system but it sets the speed for the entire simulation.
from franks's old thread:
Usage:
$timeScale = 0; // stop time
$timeScale = 1; // normal time
$timeScale = 20; // your world just got a lot faster
$timeScale = 0.1 // slowwww dowwwwn
There is also:
timeAdvance
This works for slowing down, but zero causes normal time flow. WIll not stop time.
I do not know if these affect networking, they do not slow down wave files.
#9
On multiplayer title, are a good think remove this system variable.
I never tried to set the variable on the server side. Theoretically should slow down or speed up even the client.
04/10/2012 (7:26 am)
Is client related. I haved use a SpeedHack. All player on the game can see the speedup on my character, but only why the player speed is handled by the client.On multiplayer title, are a good think remove this system variable.
I never tried to set the variable on the server side. Theoretically should slow down or speed up even the client.
#10
problem was my little knowledge.
still beginner on network side
04/15/2012 (11:34 am)
problem with slow motion solved.problem was my little knowledge.
still beginner on network side
BigDaz
Ad Hoc Software