It is currently April 20th, 2024, 12:40 pm

Rotators: Update rate, double-rotators?

Get help with creating, editing & fixing problems with skins
jumpjet2k
Posts: 3
Joined: September 5th, 2010, 5:18 am

Rotators: Update rate, double-rotators?

Post by jumpjet2k »

Everyone,

I apologize if these questions are really simple, but I haven't been able to find solutions through Search or in the Documentation.

I've got a skin I've made that sort of acts as a solar system mobile, with a set of images that all rotate about a central point. It's eye candy only, no functional purpose. The code for one of the Rotators is below.

Code: Select all

[MeterRotate1]
MeasureName=MeasureTime
Meter=ROTATOR
ImageName=1.png
X=50
Y=50
OffsetX=200
OffsetY=200
W=400
H=400
StartAngle=4.7123889
RotationAngle=6.2831853
ValueReminder=100
I'd like to find a way to have this update more than once a second, even if that'll be more CPU-demanding, because right now it's pretty choppy. Is there a simple way to do this? Changing "Update=1000" to a lower value doesn't have any effect since the rotation's based on MeasureTime.

My second question might be a little more involved. Since it's a solar system mobile, some of the planets have a moon, so I'd like those planet/moon systems to rotate around the planet's central point, while that pairing is rotating around the sun in the middle. Essentially, a Rotator within a Rotator. I imagine it would be possible to do these as animations, but that would be pretty taxing on the CPU, I suspect, and I'd rather avoid the trouble of having to make an animation by hand for these if there's a simpler and more elegant solution that could be coded.

Thanks in advance for your help.
User avatar
Chewtoy
Moderator
Posts: 995
Joined: June 10th, 2009, 12:44 pm
Location: Sweden

Re: Rotators: Update rate, double-rotators?

Post by Chewtoy »

You can't make them update faster if you've based them on a time measure.
If you, however, replace the time measure with a Counter, it will count the update cycles == it will go faster if Update is lower.

[Counter60]
Measure=Calc
Formula=Counter %60

That would be a counter that goes from 0 to 60, then start over.


As for the rotator with rotator... I've not really gotten around to use them, but couldn't you use relative positioning (r and R) for the original X and y values? That way it be relative to the previous planet/moon.
Again, I don't know that much about rotators.
I don't think, therefore I'm not.
jumpjet2k
Posts: 3
Joined: September 5th, 2010, 5:18 am

Re: Rotators: Update rate, double-rotators?

Post by jumpjet2k »

Alright, thanks for the help. I'm now having trouble getting the Counter to work with Rotator, though...

Code: Select all

Update=333

[Counter3000]
Measure=CALC
Formula=Counter %3000

[MeterPlanets]
Meter=ROTATOR
Measurename=Counter3000
ImageName=Planets.png
X=50
Y=50
OffsetX=325
OffsetY=325
W=650
H=650
StartAngle=4.7123889
RotationAngle=6.2831853
ValueReminder=[Counter3000]
DynamicVariables=1
I already know that doesn't seem right, since ValueReminder is static for a normal Rotator. Any thoughts?
User avatar
Chewtoy
Moderator
Posts: 995
Joined: June 10th, 2009, 12:44 pm
Location: Sweden

Re: Rotators: Update rate, double-rotators?

Post by Chewtoy »

Replace ValueReminder=[Counter3000]
With ValueReminder=3000

And it will all work nicely.
I don't think, therefore I'm not.
jumpjet2k
Posts: 3
Joined: September 5th, 2010, 5:18 am

Re: Rotators: Update rate, double-rotators?

Post by jumpjet2k »

Aha! That did all work nicely! Thanks, I appreciate it.