How to make a plugin do something every frame?

ive been trying to make a tool for an animation of mine where i dont want to think about orienting my ship as i drag it around... blah blah blah

...long story short i want to make a custom plugin (modifier, helper, utility,?idontknow) that can run a function every frame, or have an 'instance' of the animation on another object.

what i need is to put a dummy where my ship is going to be 5 frames in the future, i would like to just say 'd.pos =at time (currentTime +5) ship.pos' but i havent found a way to make a dummy automatically do this every frame, or every tick. is there some event handler i can use? should i make it a plugin, a helper, a modifier? what?

if anyone knows where i should look to find out this stuff thats all i need. sometimes i just cant find the answers in the help menu. so sorry if this is a common question.

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Anubis's picture

try wiring as well

try wiring as well

my recent MAXScripts RSS (archive here)

Clavery's picture

hey thanks guys for the

hey thanks guys for the replies... but i think i found another way.

i looked a little longer at the scripted plugin helper section and they have this event called 'getDisplayMesh' i originally thought this happened once, but it seems that it happens every rendered frame for the active viewport.

i know its a kinda jirry rig, but it works pretty well. ill take a look at that time callback thingy, see if its better optimized for this kinda thing.

i sware everytime i post a question here i find an answer like five minutes afterwards. thanks again for the replies.

kilad's picture

registerTimeCallback is what

registerTimeCallback is what you want

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.