warlord554 2065 Posted January 14, 2014 I have been working on a sniper rifle pack and need help animating the bipod. I can get the bipod to animate up and down, however I cannot get the legs to spread a little when deployed. Model.cfg has my selection, axis and angle, all working. How do I go about getting the legs to spread a little bit in the correct "A"shape upon deployment? Share this post Link to post Share on other sites
Yano 18 Posted January 14, 2014 You need to have two animation, first one you have working. For second one to spread the legs you need to set rotation axis for each leg (do not forget to include them into selection for bipod rotation). If you want to have legs animation after bipod animation ended, try to play with min/maxValue: bipod (minValue = 0; maxValue = 0.7; ) and leg_L and leg_R(minValue = 0.7; maxValue = 1; ) It should be looked like this: class bipod { type="rotation"; source="user"; selection="bipod"; axis="bipod_axis"; minValue=0; maxValue="1"; angle0="0"; angle1="rad 90"; }; class leg_L { type="rotation"; source="user"; selection="leg_L"; axis="leg_L_axis"; minValue=0; maxValue="1"; angle0="0"; angle1="rad 60"; }; class leg_R: leg_L { selection="leg_R"; axis="leg_R_axis"; angle1="rad -60"; }; Share this post Link to post Share on other sites
da12thMonkey 1943 Posted January 14, 2014 source="user"; Can you have user animations on weapons now then? Share this post Link to post Share on other sites
Yano 18 Posted January 14, 2014 Not sure about that, didn't try it yet, Im not on my working station, it is just example how animation works. Share this post Link to post Share on other sites
da12thMonkey 1943 Posted January 14, 2014 Roger. Was curious since user source never worked on weapons before, and you were/are kind of stuck with just the existing animation sources that BIS coded in for weapons (reload, isempty, revolving etc.). Personally I've been using the weaponMode source to add a folding bipod animation - just config them with a duplicate fire mode, with reduced prone recoil. Only really works convincingly on weapons that have one mode of fire though; like manual action or semi-auto only sniper rifles, or full-auto only MGs. Share this post Link to post Share on other sites
blackmamb 2 Posted January 14, 2014 Personally I've been using the weaponMode source to add a folding bipod animation - just config them with a duplicate fire mode, with reduced prone recoil. Only really works convincingly on weapons that have one mode of fire though; like manual action or semi-auto only sniper rifles, or full-auto only MGs. Assuming that the issue would be that you'd have to cycle through deployed/folded firemodes to get to the one you want, wouldn't it be a good idea to rearrange the way you select weapons and firemodes? So that deployed modes could only be accessed from other deployed modes or the corresponding folded mode. Obviously that would be a bit of work but that's still pretty easy to do. Share this post Link to post Share on other sites
warlord554 2065 Posted January 15, 2014 Hey you guys are great. Thx for the info. Very much appreciated Share this post Link to post Share on other sites
AlexVestin 24 Posted January 15, 2014 I'd post exactly how I have done my during tests, but I'm away from my comp for the time being. Atleast I've got some extra info that could be useful. Basically, the firemode animates each bipod leg around each legs axis when I switch firemode. The extra firemode is identical in name and all, except for the bipod position. (I have not reduced recoil for prone on my weapons yet) Something good to know to just get some extra esthetics are that weapons always default back to it's first firemode when not in use. Because of that, bipods work the best if the default position for the bipod is retracted (folded up and not in use). That way, when someone has the rifle on his back, or just whipping it out, the bipod is retracted. And as noted already, weapons with only one kind of firemode (only semi, only auto etc.) are the most appealing so the user does not have to cycle through a lot of firemodes. Hope it helps some :) Share this post Link to post Share on other sites
blackmamb 2 Posted January 15, 2014 Well, in any case, if anybody ends up interested in it, I can post an old script that I made a long time ago for A2 to modify the weapon/firemode selection. It's messy and not really pretty, I never really bothered to polish it as it was never released to the public, but pretty much what it does is use one key + mousewheel to select the weapons, and another to change the firemodes. The firemodes are memorized, so if you switch your AK to single, then switch to an RPG, and get back to the AK, it will still be in single mode. Obviously it would need a few modifications, but it would definitely allow for a more flexible use of firemodes. Share this post Link to post Share on other sites
da12thMonkey 1943 Posted January 15, 2014 (edited) Just a couple of images and thing to illustrate what I did when I tried a proof of concept on the old Arma 1 M240 MLOD (was prior to the release of Arma 2 samples). It's virtually the same as what Yano's suggested really, but pictures may prove helpful to demonstrate to people looking at this in future who have a little less knowledge of selection bones and model.cfgs Here you have the basic M240 model. I made three LOD selections out of the bipod. First a selection called bipodspigot that contains the parts of the bipod that fold up/down, but not in/out to the sides. Then I made two additional selections for the bipod legs that do fold in/out as the bipod folds down. bipodleg1 and bipodleg2 Then one needs to make the selections for the axes through which there parts rotate in the memory LOD (I've superimposed the memory LOD over the visual model to make it easier to see the relative positions). I had bipod1_axis for the up/down axis used by the spigot. and bipod2_axis for the in/out axis used by the legs. Now when it comes to setting up the model.cfg you can set up a skeleton hierarchy so that the leg selections rotate along with the spigot, in order for the whole bipod assembly folds down as one piece. class cfgSkeletons { class Default { isDiscrete = 1; skeletonInherit = ""; skeletonBones[] = {}; }; class M240 : default { SkeletonBones[]= { "bipodspigot","", "bipod2_axis","bipodspigot", "bipodleg1","bipodspigot", "bipodleg2","bipodspigot" }; }; }; You see here that bipodleg1 and bipodleg2 are set up as children to the selection bipodspigot. However, so is the axis that the two leg selections will rotate around, bipod2_axis. Now when it comes to making the animation we have the following: class CfgModels { class Default { sections[] = {}; sectionsInherit=""; skeletonName = ""; }; class m240_BP:Default { skeletonName="M240"; sections[]= { "zasleh" }; class Animations { class bipod_fold { type="rotation"; source="weaponMode"; sourceAddress="loop"; selection="bipodspigot"; axis="bipod1_axis"; minValue=0; maxValue=1; angle0="rad 0"; angle1="rad 90"; }; class bipod_legfold_1 { type="rotation"; source="weaponMode"; sourceAddress="loop"; selection="bipodleg1"; axis="bipod2_axis"; minValue=0; maxValue=1; angle0="rad 0"; angle1="rad -30"; }; class bipod_legfold_2 { type="rotation"; source="weaponMode"; sourceAddress="loop"; selection="bipodleg2"; axis="bipod2_axis"; minValue=0; maxValue=1; angle0="rad 0"; angle1="rad 30"; }; };//Animations };//modelclass };//CfgModels All the folding animations use the same weaponMode source so that they're all triggered by the same action of switching the weapon's firemode. The spigot rotates +90 degrees around the axis of bipod1_axis taking all the child selections with it in the animation bipod_fold. Simultaneously the animations bipod_legfold_1 and bipod_legfold_2 make the two leg selections rotate around bipod2_axis. Since both legs share the same axis, they rotate in equal but opposite directions in order to spread; +/-30 degrees in this case. End result is that the bipod selections will transition from this to this ...if you set up the M240 with an additional full-auto firemode As AlexVestin said, placing the bipod into the stowed position in O2 and using the model.cfg animation to fold it down instead of up, is aesthetically more pleasing, but I just did the above as a proof of concept, and didn't think of adding that sort of polish at the time. ;) It could easily be achieved though. Edited June 2, 2014 by da12thMonkey Share this post Link to post Share on other sites
Mladja-ArmASerbia 3 Posted January 16, 2014 There's an bipod script in Famas pack by Puprle You are able to fold/unfold bipods on Famas through script. Try to contact him. :) Share this post Link to post Share on other sites
Kerc Kasha 102 Posted January 16, 2014 There's an bipod script in Famas pack by PuprleYou are able to fold/unfold bipods on Famas through script. Try to contact him. :) It's probably through weapon swapping, not the most optimal way of doing it Share this post Link to post Share on other sites
warlord554 2065 Posted January 17, 2014 Monkey you sir, are the man. Nice example. I'm using weaponmode, works great. Using it to fold down, stowed any other time. Thx AV for the info original state is stowed Share this post Link to post Share on other sites