engener 10 Posted January 10, 2011 Hi, this qestion: how i make create a looped rotation anim with source=user? this not for wheel or turret animation, so do not say me about source=wheel/End this anims mast start and ends with user action, end not rotation all time, so do not say about source=time.;) Share this post Link to post Share on other sites
luki 53 Posted January 10, 2011 (edited) Hey engener :) Maby it helps... i have something similiar on a helicopter startup script where the rotors starting turn slowly when your turning on APU and so on... model.cfg part example: class Animations : Animations { class RotA { selection = "rot_blades"; type = "rotation"; source = "user"; axis = "velka osa"; memory = 0; minValue = 0; maxValue = 25; angle0=0; angle1="-20 * 3.141592654"; }; config.cpp part example: class AnimationSources { class RotA { source = "user"; animPeriod = 15; initPhase = 1; }; So you can rotate a selection like you wish with _vehicle animate ["RotA", 0]; for example. Source Bresseb: http://ofp.gamepark.cz/_hosted/brsseb/tutorials/lesson9/lesson9_e.htm Edited January 11, 2011 by Atsche Share this post Link to post Share on other sites
engener 10 Posted January 11, 2011 (edited) unfortunately does not work. i know about @If you study it, you will notice that the radar dome animation settings seem pretty odd. And they sure are! They seem to have an very large angle1 (60000+ in radians) and the animPeriod is set to 100.000. Well, the thruth is that ofp didnt support constant rotating animations (except for some hardcoded onces like the ship class` radar) and with normal settings and a angle1 set at 2*3.14159 (360*), it would just rotate one cycle and then stop. But thanks to some pioneers on the forums, they found a way to break this limit and create a constant spinning animation. Basically by setting the angle1 AND animPeriod to very high, you will force the radar to rotate slowly around the axis multiple times. It wont be forever, but with such a high angle (60.000 radians is ALOT of degrees!) and the time set to 100000 it will most certanly run for hours before it stops, and most people wont ever see it finally stopping.@ but anims still have stop time, seems this is only way to do wot i want Edited January 11, 2011 by engener Share this post Link to post Share on other sites
[aps]gnat 28 Posted January 11, 2011 (edited) The only source on constant rotation is "time", but "time" can not be stopped (just like the real world! ;) ) class radarX { type="rotation"; source = "time"; sourceAddress = "loop"; selection="RadarX"; axis="osa_radarx"; minValue = 0; maxValue = 4; angle0=0; angle1="rad +360"; }; The only way I know of stopping one "time" constantly rotating item is a Trick. The trick is you use the HIDE animation. Is that just a wall mounted strobe light? You could use the "hide" animation to hide the light source points. Therefore your light would stop. To stop other type things like radar dishes, you need two dishes in the p3d file, sitting on top of each other. One dish is static, never moves, but can be animated to hide, not hide. The other dish is the "time" animated one, that can also be animated to hide, not hide. Hide then is your User controled animation. Hence, to make it look like the radar dish has stop rotating or started rotation, you hide 1 dish, un-hide the other. Crude, but works. Edited January 11, 2011 by [APS]Gnat Share this post Link to post Share on other sites