Prodeath21 5 Posted June 14, 2020 Hey, currently I am working on a small "just for fun" addon to get better knowledge about Arma´s static objects and how to create them. At the moment I am creating a mini golf course with a windmill and i want to animate (spinn) the rotor of it. My Problem is, that i want to constantly rotate the windmill like the default windturbines in Arma 3, but slower. I was looking into the default turbines configs but had problems to understand how the animations work and start at the spawn. I also tryed to trigger my animation via a UserActions in the config.cpp, wich worked but it still was/is not the final solution for me. I also found out about the "sourceAddress="loop";" option after researching but it´s still not working 😞 I hope that explained my problem pretty well. Has anyone a solution, on how to fix that? My objects Class (inherited into CfgVehicles (config.cpp)) class Pro21_Bahn_5 : Static { author = "Prodeath21"; displayName = "$STR_Pro21_Bahn_5"; scope=2; model = "\Pro21_Minigolf\Bahn_5\Bahn_5.p3d"; icon = "\Pro21_Minigolf\default\icons\minigolf.paa"; editorCategory="Pro21_Addon"; editorSubcategory="Pro21_Objects"; //picture = "\Pro21_Minigolf\default\icons\default.paa"; //vehicleClass = ""; class AnimationSources { class windrad { source = "user"; //default "user" animPeriod = 12; //Dauer einer periode (Sekunden) }; }; }; My model.cfg class CfgSkeletons { class Default { isDiscrete = 1; skeletonInherit = ""; skeletonBones[] = {}; }; class Pro21_Bahn_5_sceleton: Default { skeletonInherit = "Default"; skeletonBones[]= { "wind","" }; }; }; class Rotation; class CfgModels { class Default { skeletonName=""; sections[]={}; sectionsInherit=""; }; class Bahn_5: Default { skeletonName="Pro21_Bahn_5_sceleton"; sections[]={""}; sectionsInherit=""; class Animations { class windrad { type = "rotation"; source = "user"; selection = "wind"; axis = "wind_axis"; sourceAddress="loop"; memory = 1; minValue = 0; maxValue = 1; animPeriod = 0; angle0 = "0"; angle1 = "rad -360"; }; }; }; }; Thank you for your help! 🙂 Share this post Link to post Share on other sites
NightIntruder 710 Posted June 15, 2020 Have you tried to multiply the value in maxValue class? Like: maxValue = 4; It may works. I usually increase the rotation speed multiplying the "angle1" value. Decreasing the speed by making it smaller like 180 degrees will just stop the animation halfway and start from the beginning again for another cycle. 1 Share this post Link to post Share on other sites
Prodeath21 5 Posted June 15, 2020 Thank you!! It finally is slower and works! I set "maxValue = 10;" to slow it down even more and get the perfect result. I also set "source = "::time";", so the windmill is starting automatically with the animation when placing it in EDEN. Here are my final lines of code: My objects Class (inherited into CfgVehicles (config.cpp)) class Pro21_Bahn_5 : Static { author = "Prodeath21"; displayName = "$STR_Pro21_Bahn_5"; scope=2; model = "\Pro21_Minigolf\Bahn_5\Bahn_5.p3d"; icon = "\Pro21_Minigolf\default\icons\minigolf.paa"; editorCategory="Pro21_Addon"; editorSubcategory="Pro21_Objects"; //picture = "\Pro21_Minigolf\default\icons\default.paa"; //vehicleClass = ""; class AnimationSources { class windrad { source = "::time"; //to start the animation automatically }; }; }; My model.cfg class CfgSkeletons { class Default { isDiscrete = 1; skeletonInherit = ""; skeletonBones[] = {}; }; class Pro21_Bahn_5_sceleton: Default { skeletonInherit = "Default"; skeletonBones[]= { "wind","" }; }; }; class Rotation; class CfgModels { class Default { skeletonName=""; sections[]={}; sectionsInherit=""; }; class Bahn_5: Default { skeletonName="Pro21_Bahn_5_sceleton"; sections[]={""}; sectionsInherit=""; class Animations { class windrad { type = "rotation"; source = "::time"; selection = "wind"; axis = "wind_axis"; sourceAddress="loop"; memory = 1; minValue = 0; maxValue = 10; animPeriod = 0; angle0 = "0"; angle1 = "rad -360"; }; }; }; }; 1 Share this post Link to post Share on other sites
Prodeath21 5 Posted June 19, 2020 Hey, thats my final addon! Check it out. https://steamcommunity.com/sharedfiles/filedetails/?id=2135377122 1 Share this post Link to post Share on other sites