View Full Version : I'm missing something...

01-13-2008, 08:22 AM
Trying to create a simple animation script. Spring on Y type of thing. Anyway, I'm missing something - very simple I guess :)
Like this little thing, I expect it to loop +Y but no. Just halts when scrubbing. Any pointers would be great.

process: ma, frame, time
objectY = ma.get(POSITION,time).y;
objectY += 1;

01-13-2008, 10:15 AM
I'm not sure what you want to do so I'm just gonna try and spell it out for you. Often having someone just mention the obvious will get the braincells out of their deadlock.

What do you mean "loop +Y"? That Y would keep increasing additively by 1 for every new frame? How will the plugins state in frame 2 know what happened in frame 1?

As is, this script will keep an item fixed at 0 in X and Z but set Y to 1 meter above whatever the keyframed value is.

01-13-2008, 10:45 AM
I'm just used to game scriptning where you have like a frameloop. So to me that piece of code would sent the object straight up.
But I guess I just missunderstood the get position command. Thought that would give me the exact current position, not the keyframed one.

01-13-2008, 11:52 AM
Sorry, it is not necessarily the keyframed one. It could also be where the interactive handle is or where another modifier has set it. Although as you know modifiers generally don't stack to well, so never assume, always test.

01-13-2008, 01:11 PM
Ah ok! Now I understand better. Thanks.