-=ENGENER=- 0 Posted November 27, 2007 The help with creation of a config for addon buildings above which I now work, in particular the help on animation of doors is necessary. Here actually a problem in what: I wish to create animation of one object, in ArmA innovations concerning it are, has riveted which as a config, but couples not animation, help :helpsos: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgPatches { class bazef { units[] = {SmallGateW}; weapons[] = {}; requiredVersion = 1.08; }; }; class CfgSounds  {  class JOF_Tur_auf  {name="JOF Tur auf";  sound[]={"BAZEFsoundJOF_Tur_open.ogg",1.000000,1.000000};titles[]={};  };  class JOF_Tur_zu  {name="JOF Tur zu";  sound[]={"BAZEFsoundJOF_Tur_close.ogg",1.000000,1.000000};titles[]={};  };  class JOF_Tor1  {name="JOF Tor1";  sound[]={"BAZEFsoundJOF_Tor1.ogg",1.000000,1.000000};titles[]={};  };  class JOF_Tor2  {name="JOF Tor2";  sound[]={"BAZEFsoundJOF_Tor2.ogg",1.000000,1.000000};titles[]={}; };  class JOF_Rada {name="JOF Rada";  sound[]={"BAZEFsoundJOF_Rada.ogg",70.000000,0.250000};titles[]={}; }; }; class CfgVehicleClasses { class BAZEF { displayName = "ENGENER BAZEF"; }; }; class CfgSkeletons { class house; //Define base class. class Bazef_bones: house { isDiscrete=1; skeletonInherit = ""; //Inherit all bones from class Car. skeletonBones[]= {  "doorL","frame"  }; }; }; class cfgModels { class house; class bazef: house { skeletonName = "Bazef_bones"; sectionsInherit=""; sections[]={doorL,doorR,frame}; class Animations { class ani_SmallGateDoor { type="rotation"; animPeriod=5;  source="SmallGate_open";  selection="doorL"; axis="osa_L"; angle0=0; angle1=1.5; }; }; /* Animation class end */ }; }; class CfgVehicles  { /*extern*/ class Thing; /*extern*/ class Building; /*extern*/ class Strategic; class NonStrategic: Building { /*extern*/ class DestructionEffects; }; /*extern*/ class HouseBase; /*extern*/ class Land_VASICore; class House: HouseBase { /*extern*/ class DestructionEffects; }; /*extern*/ class Ruins; class Flagsite:House { model="BAZEFAbmBarrack33.p3d"; armor=1000; scope=2; sound="JOF_Tur_auf"; irTarget=0; animated = 1; placement = "vertical"; vehicleClass="BAZEF"; displayName="Flagsite"; }; class SmallWallW: House { model="BAZEFAbmBarrack30.p3d"; armor=1000; scope=2; sound="JOF_Tur_auf"; irTarget=0; animated = 1;  placement = "vertical"; vehicleClass="BAZEF"; displayName="SmallWall (WOОDLAND)"; }; class SmallTowerW: House { model="BAZEFAbmBarrack31.p3d"; armor=1000; scope=2; sound="JOF_Tur_auf"; irTarget=0; animated = 1; placement = "vertical"; vehicleClass="BAZEF"; displayName="SmallTower"; }; class SmallGateW:House { model="BAZEFAbmSmallGateW.p3d"; armor=1000; scope=2; sound="JOF_Tur_auf"; irTarget=0; animated = 1; placement = "vertical"; vehicleClass="BAZEF"; displayName="Small Gate";  class AnimationSources { class  SmallGate_open { source = "user"; animPeriod = 5; initPhase=0; }; }; class UserActions { class Open_Gate { displayNameDefault="<img image='cauidataui_action_open_ca.paa' size='4'/>"; displayName="Open Gate"; position="open_pos"; radius=2.000000; onlyForPlayer = 0; condition="this animationPhase ""ani_SmallGateDoor"" < 0.5"; statement=" this animate [""ani_SmallGateDoor"", 1]"; };  class Close_Gate { displayName="Close Gate"; position="open_pos"; radius=2.000000; onlyForPlayer = 0; condition="this animationPhase ""ani_SmallGateDoor"" >= 0.5"; statement=" this animate [""ani_SmallGateDoor"", 0]"; }; }; }; }; Share this post Link to post Share on other sites
scars09 9 Posted November 28, 2007 source = smallgateopen isnt defined class AnimationSources {   class smallgateopen  {    source = "user";    animPeriod = 1;        initPhase=0;     }; }; Quote[/b] ]class CfgSkeletons { class house; //Define base class. class Bazef_bones: house { isDiscrete=1; skeletonInherit = ""; //Inherit all bones from class Car. skeletonBones[]= { "doorL","frame" }; }; }; not sure hoe the stuff is named exactly in your model, anyway, for moving parts there must be at least 2 entries class CfgSkeletons { class house; //Define base class. class Bazef_bones: house { isDiscrete=1; skeletonInherit = ""; //Inherit all bones from class Car. skeletonBones[]= { "doorL","", "doorL","frame" }; }; }; but i think there is more. try stay with the original naming in there, dvere is the door, osa_dvere the door axis. define the sections  in the model, config it as house, and define the used selections in the model.cfg and skeleton.cfg. Share this post Link to post Share on other sites
-=ENGENER=- 0 Posted November 28, 2007 New config <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class CfgPatches { class bazef { units[] = {SmallGateW}; weapons[] = {}; requiredVersion = 1.08; }; }; class CfgVehicleClasses { class BAZEF { displayName = "ENGENER BAZEF"; }; }; class CfgSkeletons {    class Bazef_bones   {     isDiscrete=1;     skeletonInherit = " "; //Inherit all bones from class Car.     skeletonBones[]=     {        "doorL"," ",        "doorR"," "          };   }; }; class cfgModels {   class house;   class bazef: house   {     skeletonName = "Bazef_bones";     sectionsInherit=" ";     sections[]={doorL,doorR,frame};     class Animations     { class ani_SmallGateDoor {              type="rotation";              animPeriod=5;              source="SmallGate_open";              selection="doorL"; axis="axis_L"; angle1=1.5; };     }; /* Animation class end */   }; }; class CfgVehicles  { /*extern*/ class Thing; /*extern*/ class Building; /*extern*/ class Strategic; class NonStrategic: Building { /*extern*/ class DestructionEffects; }; /*extern*/ class HouseBase; /*extern*/ class Land_VASICore; class House: HouseBase { /*extern*/ class DestructionEffects; }; /*extern*/ class Ruins; class Flagsite:House { model="\BAZEF\Abm\Barrack33.p3d"; armor=1000; scope=2;                 sound="JOF_Tur_auf";                 irTarget=0;                 animated = 1;               placement = "vertical"; vehicleClass="BAZEF"; displayName="Flagsite"; }; class KPP:House { model="\BAZEF\Abm\KPP2.p3d"; armor=1000; scope=2;                 sound="JOF_Tur_auf";                 irTarget=0;                 animated = 1;               placement = "vertical"; vehicleClass="BAZEF"; displayName="Chekpoint"; }; class SmallWallW: House { model="\BAZEF\Abm\Barrack30.p3d"; armor=1000; scope=2;                 sound="JOF_Tur_auf";                 irTarget=0;                 animated = 1;                placement = "vertical"; vehicleClass="BAZEF"; displayName="SmallWall (WOОDLAND)"; }; class SmallTowerW: House { model="\BAZEF\Abm\Barrack31.p3d"; armor=1000; scope=2;                 sound="JOF_Tur_auf";                 irTarget=0;                 animated = 1;                 placement = "vertical"; vehicleClass="BAZEF"; displayName="SmallTower"; }; class SmallGateW:House { model="\BAZEF\Abm\SmallGateW.p3d"; armor=1000; scope=2;                 sound="JOF_Tur_auf";                 irTarget=0;                 animated = 1;                 placement = "vertical";   vehicleClass="BAZEF";       displayName="Small Gate";          class AnimationSources { class  SmallGate_open { source = "user"; animPeriod = 5; initPhase=0; }; }; class UserActions { class Open_Gate {                             displayNameDefault="<img image='\ca\ui\data\ui_action_open_ca.paa' size='4'/>"; displayName="Open Gate"; position="open_pos"; radius=20.000000; onlyForPlayer = 0; condition="alive this"; statement=" this animate [""ani_SmallGateDoor"", 1]"; };                      class Close_Gate { displayName="Close Gate"; position="open_pos"; radius=20.000000; onlyForPlayer = 0; condition="alive this"; statement=" this animate [""ani_SmallGateDoor"", 0]"; }; }; }; };still dont work  If there will be a person, ready write a config can to lay out model. some picture of addon Share this post Link to post Share on other sites
scars09 9 Posted November 28, 2007 cfg model need the actual p3d name to work, for every model you want to animate class cfgModels { class house; class Barrack33 : house { skeletonName = "Bazef_bones"; sectionsInherit=" "; sections[]={doorL,doorR,frame}; class Animations { class ani_SmallGateDoor { type="rotation"; animPeriod=5; source="SmallGate_open"; selection="doorL"; axis="axis_L"; angle1=1.5; }; }; /* Animation class end */ }; class Barrack30 : house { skeletonName = "Bazef_bones"; sectionsInherit=" "; sections[]={doorL,doorR,frame}; class Animations { class ani_SmallGateDoor { type="rotation"; animPeriod=5; source="SmallGate_open"; selection="doorL"; axis="axis_L"; angle1=1.5; }; }; /* Animation class end */ }; }; and so on, any errormessage would be helpfull as source you can use "clockSecond" for testing purposes, so you can be sure the source is correct. the door should move a bit every second. im at work at the moment, so i cant post a functional example right now, if you cant get it handled i can post an example in about 6 hours. Share this post Link to post Share on other sites
scars09 9 Posted November 28, 2007 as example of how to do it some copy paste of one of my cfgs modelconfigname: sc9_gbe modelname:gunb.p3d selectionname(the moving stuff) : kordel skeletonname: sc9_GBBones Quote[/b] ]class cfgModels { class Default; class ship; class gunb: ship <-model p3d name!!!!!! { skeletonName = "sc9_GBBones"; sectionsInherit=""; sections[]={"kordel"}; class Animations { class kordel { type="translation"; animPeriod=3; source ="kordel"; minValue=0; maxValue=1; sourceAddress = "clamp"; selection="kordel"; begin= "mine home"; end= "mine away"; offset0= 0; offset1= 1; }; }; }; Quote[/b] ]class CfgSkeletons { class sc9_GBBones { isDiscrete=1; skeletonInherit = ""; skeletonBones[]= { "kordel","", }; }; }; Quote[/b] ]class CfgVehicles { class AllVehicles; class Ship; class sc9_gbe :Ship <modelcfgname used!!! { scope = 2; animated=1; model="\sc9_Egunb\gunb.p3d"; <-- the p3d file as used in modelcfg class AnimationSources { class radar // Should be the same as your selection name. { source = "time"; sourceAddress = "loop"; animPeriod=1; }; class kordel { source = "user"; //The controller is defined as a user animation. animPeriod = 4; //The animation period used for this controller. initPhase=0; //Initial phase when object is created. 0 = CLOSED }; }; class UserActions { class enmin { displayName ="Enable Anti Mine Procedures"; position = "pilot"; radius =15; onlyForplayer= false; condition = "this animationPhase ""kordel"" <= 0.1"; statement = "[this] exec ""\sc9_egunb\enmin.sqs"""; }; class stomin { displayName ="Stop Anti Mine Procedures"; position = "Pilot"; radius =15; onlyForplayer= false; condition = "this animationPhase ""kordel"" >= 0.9"; statement = "[this] exec ""\sc9_egunb\stomin.sqs"""; }; }; }; hope that helps a little, its from a ship, but doesnt matter. the selection and the animationsource are named the same. try to get a config working fpr one object and add the others as soon your problem is solved. speed up the testing a little. p.s. ask the mapfact guys if its ok to use their sounds and textures btw. Share this post Link to post Share on other sites
-=ENGENER=- 0 Posted November 28, 2007 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> #define TEast 0 #define TWest 1 #define TGuerrila 2 #define TCivilian 3 #define TSideUnknown 4 #define TEnemy 5 #define TFriendly 6 #define TLogic 7 #define true 1 #define false 0 #define private 0 #define protected 1 #define public 2 class CfgPatches { class bazefaddons { units[] = {SmallGateW}; weapons[] = {}; requiredVersion = 1.08; }; }; class CfgVehicleClasses {       class BAZEF      {       displayName = "ENGENER BAZEF";      }; }; class CfgSkeletons {   class sc9_GBBones   {     isDiscrete=1;     skeletonInherit = "";     skeletonBones[]=     {        "doorL","",       };   }; }; class cfgModels {   class house;   class SmallGateW: house   {     skeletonName = "sc9_GBBones";     sectionsInherit="";     sections[]={doorL};     class Animations     { class doorL {                      type="rotation";                      animPeriod=5;                      source="doorL";                      selection="doorL";                      minValue=0;                      maxValue=1; axis="axis_L";                      angle0=0; angle1=1.5;                      offset0= 0;                      offset1= 1; };     }; /* Animation class end */   }; }; class CfgVehicles  { class Fortress1; class SmallGateW : Fortress1 {   model="\BAZEF\Abm\SmallGateW.p3d";   armor=2000;   scope=2;                 sound="JOF_Tur_auf";                 irTarget=0;                 animated = 1;                 placement = "vertical";   vehicleClass="BAZEF";       displayName="Small Gate";          class AnimationSources { class  doorL { source = "user"; //The controller is defined as a user animation.                      animPeriod = 4;  //The animation period used for this  controller.                      initPhase=0;   //Initial phase when object is created. 0 = CLOSED }; }; class UserActions { class Open_Gate {                             displayNameDefault="<img image='\ca\ui\data\ui_action_open_ca.paa' size='4'/>"; displayName="Open Gate"; position="open_pos"; radius=2.000000; onlyForPlayer = false; condition="alive this"; statement=" this animate [""ani_SmallGateDoor"", 1]"; };                      class Close_Gate { displayName="Close Gate"; position="open_pos"; radius=2.000000; onlyForPlayer = false; condition="alive this"; statement=" this animate [""ani_SmallGateDoor"", 0]"; }; }; }; }; dont work  PS i talk to one of them, all ok, excepting this dammit anims ofcose Share this post Link to post Share on other sites
scars09 9 Posted November 29, 2007 im actually not sure if the config u posted is still in "shape" i copy and pasted it as base for the following example. it wasnt functional after i paste it. try get a good text editor. he will mark missing } or missing ; and so on. helps alot with this config crap here is a working door i made for you to show how its done. Its important to use the same definitions in the model and the config, depbo my example and look how things in the addon are named and how i used them in config. doortest and here is a link to the texteditor i use, its free and has some nice features. maybe take a look there PSPPAD free Texteditor Share this post Link to post Share on other sites
-=ENGENER=- 0 Posted November 29, 2007 file it is not found gives out upload to rapidshare plz Share this post Link to post Share on other sites
bk1276 0 Posted November 29, 2007 Quote[/b] ]www.scars09.de/files/doortest.rar copy and paste link into browser Share this post Link to post Share on other sites
-=ENGENER=- 0 Posted November 30, 2007 thanks, to all, but i cant unpbo this file ArmAUnPBO dont work Share this post Link to post Share on other sites
Bracken 0 Posted November 30, 2007 CPBO opened it fine for me. Thanks though Scar, helped me out also Share this post Link to post Share on other sites