Multiple Personalized Character Animations
by joint heir · in Artist Corner · 05/29/2005 (8:30 pm) · 8 replies
Hi This is my first post as a Tourque Owner. I would like to know exactly how to get my
custom moves to work in Tourque. Root, Run look and all that are great & i've gotten them all to
work but I want to see some of my own cool animations at the press of a button.
I've attempted modifying the "$mvTriggerCountn" buttons
within the client & server scripts (which is supposed to overide the Tourque defaults), but nothing
happens in game when I press the button. In my log file I get "command not recognized"
Will Tourque support custom animations that don't fall under the presets? Exactly How do I override
those presets & make it so that depressing a keyboard button (or mouse button for that matter) will play one of my custom
animations?
custom moves to work in Tourque. Root, Run look and all that are great & i've gotten them all to
work but I want to see some of my own cool animations at the press of a button.
I've attempted modifying the "$mvTriggerCountn" buttons
within the client & server scripts (which is supposed to overide the Tourque defaults), but nothing
happens in game when I press the button. In my log file I get "command not recognized"
Will Tourque support custom animations that don't fall under the presets? Exactly How do I override
those presets & make it so that depressing a keyboard button (or mouse button for that matter) will play one of my custom
animations?
About the author
#2
& I need almost everything explained (sorry). I'm aware of where to type that line in but could
you explain the (0,\"celwave\");",""); part please? Do I need to type something somewhere else?
05/30/2005 (2:14 pm)
Thank You Matt, but it didn't work. Just to let everyone know, I am a very very novice programmer & I need almost everything explained (sorry). I'm aware of where to type that line in but could
you explain the (0,\"celwave\");",""); part please? Do I need to type something somewhere else?
#3
so if you for example have an animation named RightPunch, the keybind would be
or something like that.. remember this will be in player.cs
ctrl r would be Control + R (simultaneously),, it should work.... maybe you should check your model file and make sure the animation you want is named correctly.
let me know if it works... experts correct me if i'm wrong, i just bought torque a few days ago.
06/15/2005 (4:18 pm)
Celwave is the name of the animation in the model. so if you for example have an animation named RightPunch, the keybind would be
MoveMap.bindCmd(keyboard, "ctrl r", "$model.playThread(0, \"RightPunch\");", "");
or something like that.. remember this will be in player.cs
ctrl r would be Control + R (simultaneously),, it should work.... maybe you should check your model file and make sure the animation you want is named correctly.
let me know if it works... experts correct me if i'm wrong, i just bought torque a few days ago.
#4
06/15/2005 (6:30 pm)
Is there any reason you guys are putting slashes in the animation name? ive seen others simple place the animation name in double quotes.
#5
06/15/2005 (8:40 pm)
I just copy and pasted the line that Matt wrote, It might be incorrect, but I'm not sure. If it doesn't work, you guys should use just double quotes.
#6
To make this work you need to assign you model instance (StaticShape) to the global $model variable.
06/16/2005 (12:36 am)
Note the double quote in front of $model...if it got to the one before RightPunch and it didn't have a slash then it would think that was the ending double quote. Instead we use a slash to insert a double quote into the finished string without having it end on that quote...it skips over it if you like. If you were typing $model.playThread(...); directly into the console you would have to do that since there would be those outer quotes.To make this work you need to assign you model instance (StaticShape) to the global $model variable.
#7
06/17/2005 (12:50 pm)
Ok let me expand on this question. Let's say I have multible punch animations like "Left jab" "Right jab" and "Upper cut". And I want the user to press once and just left jab, but if the user presses twice in quick succession it will play left jab followed by right jab. Is this very difficult to implement?
#8
Toby.
06/18/2005 (4:39 pm)
BTW guys - You're code is a little short. It's not as easy as just binding the key for the animations. Run a search for celwave (in your FPS files) and you will find out why - there is some added scripting for this. I haven't figured it out totally yet, but I will.Toby.
Associate Matt Fairfax
PopCap