Linker Split 0 Posted June 30, 2008 Hi guys, I have my character with goggles, and i want to add an user action with which the player can choose what do to: to put goggles on or not. I added the right section, configured in my cfgSkeletons and cfgmodels, but the animation doesn't play! There's the user action "goggles on", but they don't want to go down on my unit's eyes... is there a way to have it working? Share this post Link to post Share on other sites
sfc.itzhak 0 Posted June 30, 2008 Hi guys, I have my character with goggles, and i want to add an user action with which the player can choose what do to: to put goggles on or not. I added the right section, configured in my cfgSkeletons and cfgmodels, but the animation doesn't play!There's the user action "goggles on", but they don't want to go down on my unit's eyes... is there a way to have it working? its in how you define it in the add action or in the skeliton. now i cant tell if you did it right or not but show the script you made cause all other animation i did with vehicles and men works. if you wish talk on msn. sfc Share this post Link to post Share on other sites
cervantes 330 Posted July 1, 2008 yes its possible linker you need define a animation in class config model. for exemple: class CfgModels { class Default { sections[] = {"osobnost","Head_Injury","Body_Injury","l_leg_injury&a mp;a mp;a mp;a mp;a mp;q uot;,"l_arm_injury","r_arm_injury","r_leg_injury","clan ","google"}; sectionsInherit="";  class animations       {          class google          {             type="rotation";      source = "rotations";             animperiod=.01;             selection="Head";             axis="head"; minValue = 0; maxValue = 1;             angle0=0;             angle1=1.745; initPhase = 0;          };   }; }; and in class user action: class AnimationSources { class rotations { source = "user"; animPeriod = 1; initPhase = 0; }; };       class UserActions       {          class googleOn          {             displayName="Put on google";      onlyForPlayer = 0;             position="google";             radius=0.1;             condition= "this animationPhase ""google""== 0";             statement= "this animate [""google"",1]";          };          class googleOff          {             displayName="Take off google";      onlyForPlayer = 0;             position="google";             radius=0.1;             condition= "this animationPhase ""google"" == 1";             statement= "this animate [""google"", 0]"               };   }; if this d'ont working define this by a hidenselection hiden a google and enable a selection by script statement= "this animate [""google"", 0] and this exec ""googleon.sqs"""; and in googleon.sqs _this setObjectTexture [0,""]; _this setObjectTexture [1,"\myaddon\google.paa"]; _this setObjectTexture [2,""]; and identical for a google off and in googleoff.sqs _this setObjectTexture [0,""]; _this setObjectTexture [1,""]; _this setObjectTexture [2,""]; Share this post Link to post Share on other sites
UNN 0 Posted July 1, 2008 You can't combine rtm and cfg anims. As CERVANTES said, you will have to use setobjecttexture. If you do a search for Bush Wars in the Addon Complete thread. Their heli pilots have examples of everything you need. Here's a link that explains some of the logic behind the Bush Wars scripts. Share this post Link to post Share on other sites
Linker Split 0 Posted July 1, 2008 You can't combine rtm and cfg anims. As CERVANTES said, you will have to use setobjecttexture. If you do a search for Bush Wars in the Addon Complete thread. Their heli pilots have examples of everything you need.Here's a link that explains some of the logic behind the Bush Wars scripts. no maybe you misunderstood: I'm not implementing RTMS since there's no way to do it i only want to add the useraction to take on and off my goggles. My character already uses the setObjectTexture thing to change the uniform during the gameplay, and I was thinking to do the same for the goggles if I'll not be able to configure a proper useraction for it. thank you guys Share this post Link to post Share on other sites
UNN 0 Posted July 1, 2008 Quote[/b] ]no maybe you misunderstood: I'm not implementing RTMS since there's no way to do it No, I was replying to CERVANTES on that point. I'm just too lazy to use the direct reply quotes Like I said, the Bush Wars mod uses SetObjectTexture to achieve what you requested. Share this post Link to post Share on other sites
cervantes 330 Posted July 5, 2008 yes its possible if you define this in cfgmovemale and add in class user action exemple condition="(animationState this!= ""google animation name"")"; statement="this playmove ""google anmation name"""; and its possible in class config model if you define a hiden selection and use one script with setobjecttexture for enable a textures Share this post Link to post Share on other sites