Jump to content
isenhand

Animation not triggered in game

Recommended Posts

I have a mode house with a door that I would like to animate so a player can open and close the door. But the player gets no option to do so in game.

 

I made the house in blender. Added a memory lod with 3 vertices. Two are grouped as "door1_axis" in a vertex group and lie where the door axis is. The third is grouped as "door_actionptn" in a vertex group and lies mid way in the door. The door itself is grouped as "Door1" in a vertex group. The model is called "house_c_w_d".

 

I define a model.cfg file with class CfgSkeletons containing a default class and class house_c_w_d_bones : Default. The class house_c_w_d_bones contains skeletonBones[] = {"Door1", ""}; . I define class CfgModels which contains class house_c_w_d : Default. In that class is class Animations which contains class house_c_w_dRotation : Rotation which has source="house_c_w_dRotation"; (I've tried "user" as well) and selection="Door1" and axis="door1_axis";.

 

I define a config.cpp file with class AnimationSources which contains class house_c_w_dRotation with source="user";. I also have class UserActions containing class OpenDoor with statement = "this animate [""house_c_w_dRotation"", 1]";.

 

I load the mode in Object builder and the vertices appear in the Named Selections window of the memory lod. I use buldozer to test the animation and it works ok.

 

I put the model in a terrain using terrain builder.

 

However, when I crunch the terrain and load it up in ARMA I can not trigger the animation. There is no option nor window to do so. As if the "door1_actionpnt" isn't recognised nor triggered.

 

Anyone any ideas why?

 

The model.cfg file is here:

 

http://pastebin.com/kJQDpsph

 

The config.cpp file is here:

 

http://pastebin.com/UGJGK9UF

 

Thanks.

 

 

Share this post


Link to post
Share on other sites

Have you tried animating it as a door?

 

config.cpp

49  source = "door";

66. condition = "this doorPhase 'house_c_w_dRotation' < 0.5";

67. statement = "this animateDoor ['house_c_w_dRotation', 1]";

78. condition = "this doorPhase 'house_c_w_dRotation' > 0.5";

79. statement = "this animateDoor ['house_c_w_dRotation', 0]";

 

model.cfg

45. class house_c_w_dRotation {

                source = "house_c_w_dRotation";
                sourceAddress = "clamp";
                type = "rotation";
                selection = "Door1";
                axis = "door1_axis";
                memory = 1;

                minValue = 0;
                maxValue = 1;

                angle0 = "rad 0";
                angle1 = "rad -90";
};

Share this post


Link to post
Share on other sites

m1km8n fixed it :)

 

It was a problem in class Animations. It should be referring to the bone (Door1):

 

class Animations
{
       class door1 : Rotation
       {

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×