Boborish 1 Posted July 28, 2008 I have a tracer that I want to animate, the config looks like this <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class cfgSkeletons { class Default; class brh_tracerTrail_skeleton : Default { isDiscrete=1; skeletonInherit=""; skeletonBones[]={"trail",""}; }; }; class cfgModels { class Default { sections[] = {}; sectionsInherit = ""; }; class brh_redTracerTrail : Default { sectionsInherit=""; sections[]={"trail"}; skeletonName="brh_tracerTrail_skeleton"; class Animations { class trail { type="translation"; source="user"; selection="trail"; axis="trail_axis"; begin="trail_begin"; end="trail_end"; animPeriod=0.0125; memory=1; minValue=0; maxValue=1; offset0=0; offset1=1; }; }; }; }; class CfgVehicles { class brh_redTracer : Thing { model = "\brh_tracers\brh_redTracer.p3d"; icon = "\ca\data\data\Unknown_object.paa"; displayName = ""; scope = 1; simulation = "thing"; nameSound = ""; transportFuel = 0; mapSize = 0.2; accuracy = 0; cost = 0; armor = 50000; class DestructionEffects {}; class AnimationSources { class trail { type="translation"; source="user"; selection="trail"; axis="trail_axis"; begin="trail_begin"; end="trail_end"; animPeriod=0.0125; memory=1; minValue=0; maxValue=1; offset0=0; offset1=1; }; }; }; }; I keep trying all evening now and simply cant make it working. The model seems to be fine, Im using <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">tracer animate ["trail",1] but nothing happens. Is the config alright? Share this post Link to post Share on other sites
poweruser 10 Posted July 28, 2008 The class name for your tracer object in the cfgModels section has to correspond to the model name. So, either call your class "brh_redTracer" or rename your model file. Source: http://community.bistudio.com/wiki/Model_Config#cfgModels The settings in the AnimationSources class (cfgVehicles section) are different from the ones of the Animations class (cfgModels section). http://community.bistudio.com/wiki/Model_Config#Animation_sources Examples are at the bottom of that page. Should be like this for your tracer: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class AnimationSources {  class trail  {    source = "user"; //The controller is defined as a user animation.    animPeriod = 0.0125;  //The animation period used for this controller.    initPhase=0;   //Initial phase when object is created.  }; }; Share this post Link to post Share on other sites
rocket 9 Posted July 28, 2008 As described above, make sure you have defined the custom animation source in the config.cpp file section cfgVehicles for the object you are animating. You also need to call the animation itself. Here's a very rough example of the code in use: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">  class bunker : MainBunker {    access = ReadOnly;    displayName = "bunker";    animated = true;    model = "\usec\bunker.p3d";    vehicleClass = "NUNIVAK_OBJECTS";    class AnimationSources {     class BunkerDoor {       source = "user";       animPeriod = 5;       initPhase = 0;     };     };       class UserActions    {     class OpenDoors     {       displayName="Open Doors";       position="pos driver";       radius=5;       condition="this animationPhase ""door_L"" < 0.10;";       statement="this animate [""door_L"",1];this animate [""door_R"",1];";       onlyforplayer = true;     };     class CloseDoors     {       displayName="Close Doors";       position="pos driver";       radius=5;       condition="this animationPhase ""door_L"" > 0.90;";       statement="this animate [""door_L"",0];this animate [""door_R"",0];";       onlyforplayer = true;     };    };  }; Share this post Link to post Share on other sites
Boborish 1 Posted July 29, 2008 The model name is identical with both, the model class name and the vehicle class name. Also the difference of those two definitions in CfgModels >> Animations and CfgVehicles >> AnimationSources is just a small mistake, I noticed it later, fixed it and tried it out, didnt work anyway. I thought there might be problem with the offset1 value or maxValue ... isnt there? I also noticed that the object config you shown me has an animated parameter which I dont have in my definition. There might be a problem. Ill try it out and let you know. Share this post Link to post Share on other sites
poweruser 10 Posted July 29, 2008 Example which shows what I mean with: The class name for your tracer object in the cfgModels section has to correspond to the model name. Quote[/b] ]class cfgModels {    class Default    {      // config code    };    class <span style='color:red'>myModelName</span> : Default    {      // config code    }; }; class CfgVehicles {    class someClassName : Thing    {      model = "\folder\<span style='color:red'>myModelName</span>.p3d";      // config code    }; }; The two names marked in <span style='color:red'>red</span> have to be the same. Otherwise ArmA doesn't know to which model the defined animations belong to. In your config they are different. Your cfgModels class is called:  brh_redTracerTrail And your model filename is:    brh_redTracer Share this post Link to post Share on other sites
Boborish 1 Posted July 29, 2008 Ops, another mistake. The model name is identical with the class name in my config but not in here because when I was copying it, I tried to make it shorter. The brh_redTracerTrail evolves from brh_redTracer and I accidentally forgot to change the model definition. So this is not the problem, otherwise it would show an error message but this doesnt show anything. It simply doesnt work and the damn ArmA cant tell me why. The animated=1 didnt help. Share this post Link to post Share on other sites
Boborish 1 Posted July 29, 2008 Now this is fkin' weird! I take Solus' SLX UH60MG, rename the "Door_3" to "trail", "axis_door_3" to "trail_axis", rename the model to brh_redTracerTrail and it works. Then I delete all LODs except the 1st one and Memory, works fine. I delete all unnecessary Memory points (leaving trail_axis only), works fine. Then I delete all unnecessary in the 1st LOD (and add a box to have something to compare it to), it stops working. I go one step back... now I delete all proxys, it stops working. I go back again, delete other part of the model (not a proxy one), works fine. Then I delete everything except the trail selection and one proxy. Works fine. What the hell?? Share this post Link to post Share on other sites