XML rand/ windmill template

WindMil_Rotate
1
rand 360 *


(O:XMLVAR_IsInit) 0 == if{ 1 (>O:XMLVAR_IsInit) #STARTANGLE# sp0 } l0 (A:AMBIENT WIND VELOCITY,feet per second) #SPEED_RATIO# * (A:ANIMATION DELTA TIME, seconds) * +
1
1

Above is the windmill template used to drive Windmill Basically it creates a
random start frame for the rotation animation And…it doesn’t work as
intended, not that much, pretty much all the Windmill loaded in the same area
have the same start point, they are all synched -------- So last year I made
a simple replacement using a handful of different animations with
BlendTreeState <https://flightsim.to/file/30442/default-wind-turbine-
replacement> that worked flawlessly until SU10, than the animations started
stuttering (maybe because of a change in the animations architecture, dunno)
--------- However, I came back to Default template trying to understand why
it doesn’t work as intended (simply open the behaviors debug window in a place
like Palm Spring KPSP, all the Windmill.xml share the same START_ANGLE value)
Hey, the rand is missing a seed! (Every rand needs a seed, this is how
computer works…bah!) So tried something like

33563 seed rand 360 *

No luck, the seed should be working this way?

Hi @mamudesign , I believe the issue is due to caching, which means that the
value doesn’t change when an instance of the object is created. We will review
this, and I will keep you updated. Also, you might already be aware, but as a
temporary workaround, you can use ‘typeParam=“Random”’ within the ‘’ tag in
your XML file. Regards, Boris

Thanks Boris, looking forward! Yeah my mod had a random in the Animation tag,
But that must be mixed with the windspeed, so I made several animations with
“random” and threw them in a BlendTreeState, using the wind speed as a value,
just like the windsock sample or a flag. But the how the animations, are
Blended together is not documented, and the result is when the threshold of an
animation is reached, the blending makes the blade going bananas. With
something organic like a cloth is not noticeable, however with rotating blade,
frame skipping/ blade going backwards can be annoying