Stopping Default Player Animations
by Pale · in Torque Game Engine · 11/29/2007 (9:11 am) · 5 replies
Hi all,
I am in the process of evaluating Torque right now for use on a larger project at work. As a tool for the evaluation, we decided to throw together a quick Christmas game to send out to our clients for fun.
I am trying to customize my player (Santa) a little bit and I have a question. I'm attempting to do this entire mini game using just Script, as that is a good way to discover the limitations of scripting vs direct engine modifications.
Anyway, we made some custom animations that I want to queue up in script. Problem is right now (using playThread()) they are combining with the current default animation being played (like root or walk), which creates weird results.
Is there a way in script to temporarily disable the default animations that the engine calls? If not, does anyone have a fast way that I can do it in engine code just to achieve this effect?
Thanks.
I am in the process of evaluating Torque right now for use on a larger project at work. As a tool for the evaluation, we decided to throw together a quick Christmas game to send out to our clients for fun.
I am trying to customize my player (Santa) a little bit and I have a question. I'm attempting to do this entire mini game using just Script, as that is a good way to discover the limitations of scripting vs direct engine modifications.
Anyway, we made some custom animations that I want to queue up in script. Problem is right now (using playThread()) they are combining with the current default animation being played (like root or walk), which creates weird results.
Is there a way in script to temporarily disable the default animations that the engine calls? If not, does anyone have a fast way that I can do it in engine code just to achieve this effect?
Thanks.
About the author
#2
11/29/2007 (2:33 pm)
When exporting a custom animation, try setting its priority higher than 0.
#3
Why is it though that, again using the blue guy, setActionThread("jump") doesn't work? Obviously jump is one of the built in animations that you probably won't ever want to call on your own, but this points to something differentiating the two dsq files.
In showprotool, both of these come up as having a priority of 0. While the logic of priority makes sense to me, it doesn't seem to be having any effect at all, as we've tried setting the priority of our animations to 1 as Walter Yoon suggested.
11/30/2007 (10:34 am)
This does appear to have everything to do with exporting the files, as using the default blue guy, calling setActionThread("celwave") works fine in my game.Why is it though that, again using the blue guy, setActionThread("jump") doesn't work? Obviously jump is one of the built in animations that you probably won't ever want to call on your own, but this points to something differentiating the two dsq files.
In showprotool, both of these come up as having a priority of 0. While the logic of priority makes sense to me, it doesn't seem to be having any effect at all, as we've tried setting the priority of our animations to 1 as Walter Yoon suggested.
#4
Changing how thread 0 is handled requires some major code hacking, so playing them in a different thread might be better, in addition to exporting at a higher priority.
EDIT: Alternatively, instead of fiddling around with priority and threads, it might be simpler to export your fall animation as a blend sequence based on root.
12/01/2007 (7:00 am)
playThread(0, "fall");You're playing your sequences in thread 0. If I remember correctly, the default engine is very strict when it comes to what sequences are played in thread 0, so that the player's movement animations always match his direction/velocity/terrain/etc.
Changing how thread 0 is handled requires some major code hacking, so playing them in a different thread might be better, in addition to exporting at a higher priority.
EDIT: Alternatively, instead of fiddling around with priority and threads, it might be simpler to export your fall animation as a blend sequence based on root.
#5
It was totally my bad. I had a broken dsq that was being imported BEFORE the dsq I was trying to call but AFTER all the other dsqs.
This was causing it to break. Getting rid of that and it worked fine.
12/06/2007 (12:28 pm)
Update on this issue...It was totally my bad. I had a broken dsq that was being imported BEFORE the dsq I was trying to call but AFTER all the other dsqs.
This was causing it to break. Getting rid of that and it worked fine.
Torque Owner Pale
Sadly this does NOTHING... I'm totally confused.
playThread(0, "fall"); will play the fall animation combined with the root animation.
setActionThread("fall"); makes no obvious difference to anything.