Game Development Community

Animations as Behavior Fields

by Cassy Brink · in Torque Game Builder · 12/17/2008 (9:59 am) · 1 replies

I can't remember exactly how I had done it before, but a year or so ago (it's been a while since I've used TGB. I've been playing around with DirectX 10 for a while <3), I was able to create a behavior that had four fields, each was to be an animation. I believe it was the type used for the field, I'm not one hundred percent sure, but it allowed me to select the animation from a list of animation datablocks in the project. Everything I have tried recently simply puts it as a string for me to type in, which is fine, but I think that it would be more convenient if I can recreate the old drop-down selection.

If anybody can offer any advice, I would appreciate it.

#1
01/30/2009 (11:21 am)
Hi,
I know what You mean - I'm using same system for my game. After behavior template is created, just add a line:

%template.addBehaviorField(anim2, "Animation 2", object, "", t2dAnimationDatablock);

this will give You a behavior field where You'll be able to choose animation from the drop-down menu.

Hope this helps :)