help: "at time 1000 <controller> =value" changes value at time 0 aswell
I'm working on my 1st serious script, and it's comming along great sofar. It's suppost to get data out of an array [Plt=#()], and build a solarsystem.
Building it stationairy works fine with an 'for'-loop [for i=1 to Plt.count do], but now that i'm starting to set keys i bump into something unexpected:
(for readabilaty, i simplified a bit. here Plt[i] is a startvalue and Plt[i] is a period in frames. globe is a sphere and orbit an ellips, both created earlier)
1 globe.pos.controller = Path_Constraint() 2 globe.pos.controller.path = orbit 3 at time 0 globe.pos.controller.percent = (Plt[i]) 4 at time 1000 globe.pos.controller.percent = / 100*((1000)/(Plt[i]))+ Plt[i]
in line 2, 2 keys are created [0%@0f and 100%@1000f].
These i expected, but are not correct,so:
in line 3 i assign a start-value to the 1st key. if i do not run line 4, this works fine.
The value of the endframe should be:
100%*(times rotationperiod fits in animationlength)+ startvalue.
if i run line 4 aswell, it indeed sets this key to that value, but it changes my startkey 0f aswell (into this same value-100 )
i tried to figure it out what's wrong with F1 and the Maxscript Essentials book from autodesk, but i'm stuck. so my question: What am i doing wrong?