We can build a "cabinet" with attachment point at the centre of the fan, and with the blades coming out as sections in three directions. We can then animate the "angle" of the cabinet by formula control and cause the fan to rotate one full cycle every 2 seconds, giving rise to a gentle refreshing breeze in the room.
You can use as many concurrent timers as required, to both increment and decrement.When you press the button, the top two sliders will increment at different speeds and the third slider will decrement, as per the formula shown below.
The next example increments sliderval from its current value (startval) up to 100 in steps of 1. The delay between increments is 200 milliseconds (5 steps per second). If the processing cannot keep up with this it will just have a longer delay between steps.
Set up a button to autoincrement the middleware variable "sliderval" like this:
SetValueTimed("sliderval",sliderval,100,1,200)
If the user changes the slider manually and therefore changes the sliderval, the automatic incrementing will notice the change and stop the automatic incrementing.
It may be helpful to the user to be able to click on a Play/Stop button to start and then interrupt the playing directly also. For example if the user wants to zoom/pan or rotate to change the 3D viewing position during the "playing".', 'You can set up a middleware button which changes its label based on a yesno variable PlayStop.
And when you click the button it can execute a PlayAction variable which could be defined like this:
:If PlayStop
Then SetValueTimed("sliderval",sliderval,100,1,200);SetValue("PlayStop",No)
Else SetValue("sliderval",sliderval-1);SetValue("PlayStop",Yes)