T3D Player Animations
by Quinton Delpeche · in Torque 3D Professional · 10/25/2009 (6:52 am) · 3 replies
I must be really dumb ... I know this topic has been brought up before but I am unable to find a valid solution, so hopefully somebody will be able to point me in the right direction.
I am using T3D 1.0.1 with the updated Sticks and Twigs released last night, I get my custom player model into the project no problem, it displays fine except that none of the animations work. Here are the steps I have taken.
Attempt 1:
1). I copied the gideon.cs from "art/shapes/Gideon/" and placed it in my custom player folder "art/shapes/Ortugg/ortugg.cs". I then modified all the lines to point to the right DTS files and DSQ animations.
2). I then went to "art/datablocks/player.cs" and updated the "BoomBot" reference there to point to the new DTS file and folder. I changed the name to "OrtuggFootPrint" and "OrtuggData" respectively.
3). Changed the default spawnDataBlock to refer to "OrtuggData". And started the game and then launched the level. Model appears, properly textured and everything ... but no animations ... no idle animations ... nothing. What is frustrating is that I don't get any console errors in the console log.
So thinking I was doing something wrong I trawled through the forums and found this post: animations that worked no longer working.
Attempt 2:
1). Followed all the steps correctly and used the BaseMale model ... once again no animations ... although the BaseMale model does appear.
So I am not sure any more ... am I being dumb or did I miss something fundamentally wrong here?
Please if you can point me in the right direction to a working example or send me working examples I will be greatly appreciative. :)
If I have missed a vital post on the forums or something then I am sorry, I did do various searches beforehand and tried a few different things.
These models are verified as working in TGEA 1.8.1 and TGEA 1.8.2.
Thanks again for any help. :)
I am using T3D 1.0.1 with the updated Sticks and Twigs released last night, I get my custom player model into the project no problem, it displays fine except that none of the animations work. Here are the steps I have taken.
Attempt 1:
1). I copied the gideon.cs from "art/shapes/Gideon/" and placed it in my custom player folder "art/shapes/Ortugg/ortugg.cs". I then modified all the lines to point to the right DTS files and DSQ animations.
2). I then went to "art/datablocks/player.cs" and updated the "BoomBot" reference there to point to the new DTS file and folder. I changed the name to "OrtuggFootPrint" and "OrtuggData" respectively.
3). Changed the default spawnDataBlock to refer to "OrtuggData". And started the game and then launched the level. Model appears, properly textured and everything ... but no animations ... no idle animations ... nothing. What is frustrating is that I don't get any console errors in the console log.
So thinking I was doing something wrong I trawled through the forums and found this post: animations that worked no longer working.
Attempt 2:
1). Followed all the steps correctly and used the BaseMale model ... once again no animations ... although the BaseMale model does appear.
So I am not sure any more ... am I being dumb or did I miss something fundamentally wrong here?
Please if you can point me in the right direction to a working example or send me working examples I will be greatly appreciative. :)
If I have missed a vital post on the forums or something then I am sorry, I did do various searches beforehand and tried a few different things.
These models are verified as working in TGEA 1.8.1 and TGEA 1.8.2.
Thanks again for any help. :)
About the author
Gobbo Games is an Independent Games Development company operating from Durban in South Africa. We believe in creating high-quality cost-effective games that remain true to the belief of Independent Game Developers around the world.
#2
I think that there are a few changes in naming conventions which initially caught me out.
1.
Make sure your Playerdata is called (DefaultPlayerData) as it gets referenced in spawning scripts in gamecore.cs.
2.
With playerdata(yourname) make sure you have "data" to the end of (yourname) if you're using other cs files.
3.
Make a seperate cs file for your new model/playertype on top of theplayer.cs, here point to the animations/shape file.
e.g.
4.
In your players/actors/wherever folder have the new cs and make sure it says dts at the end of the singleton name.
e.g.
5.
Make sure you exec your new files from art/datablocks and scripts/server!
10/25/2009 (12:49 pm)
First up, open Shape Editor and load your shape up. Are the animations working? Are they listed? If not then they're not getting referenced correctly, my guess would be #4 hint/example I give here.I think that there are a few changes in naming conventions which initially caught me out.
1.
Make sure your Playerdata is called (DefaultPlayerData) as it gets referenced in spawning scripts in gamecore.cs.
2.
With playerdata(yourname) make sure you have "data" to the end of (yourname) if you're using other cs files.
3.
Make a seperate cs file for your new model/playertype on top of theplayer.cs, here point to the animations/shape file.
e.g.
exec("art/shapes/players/yorks/squaddie1.cs");
datablock PlayerData(squaddie1data : DefaultPlayerData)
{
shapeFile = "art/shapes/players/yorks/squaddie1.dts";
shootingDelay = 540; // just a place holder
debrisShapeName = "art/shapes/players/common/debris_player.dts";
debris = playerDebris;
//......
}4.
In your players/actors/wherever folder have the new cs and make sure it says dts at the end of the singleton name.
e.g.
singleton TSShapeConstructor(squaddie1dts)
{
baseShape = "./squaddie1.dts";
sequence0 = "art/shapes/players/animations/arootx.dsq root";
sequence1 = "art/shapes/players/animations/arun2.dsq run";
//.......
}5.
Make sure you exec your new files from art/datablocks and scripts/server!
#3
Thanks Steve ... I will try this straight away. As I said I was probably missing something pretty stupid in script land. :(
Thanks again for the help everybody ... the community rocks. :)
Edit: Thanks Steve for your advice ... worked like a charm. Initially the animations weren't showing up in the "Shape Editor". After re-checking the scripts and making sure I applied all your suggestions, the animations showed and the model now works 100%.
Thank you very much. :)
10/25/2009 (2:02 pm)
Picasso, no as I used the sample file that was provided by OmegaDog in the thread mentioned, I ended up with the same result. That is why I am pretty sure it is script based.Thanks Steve ... I will try this straight away. As I said I was probably missing something pretty stupid in script land. :(
Thanks again for the help everybody ... the community rocks. :)
Edit: Thanks Steve for your advice ... worked like a charm. Initially the animations weren't showing up in the "Shape Editor". After re-checking the scripts and making sure I applied all your suggestions, the animations showed and the model now works 100%.
Thank you very much. :)
Torque Owner Ivan Mandzhukov
Liman3D
Some of the animation names are hardcoded and used within an exact number in the enumerator.
Messing this indexes,you can see a floating player.