Expression editor syntax updates



I’m writing a script that puts one joint on a motion path and more joints follow it via reading its animation and ofsetting it by x number of frames, animators control the animation via a central control and a few others

I’m trying to have my script use the expression editor to create a sort of makeshift node that reads the frame number and uses it to offset the animation between the joints

I’m having an issue with the expression editor, my issue involves getting the frame number and using it as an expression of time, I know this syntax works because I’ve seen it in earlier versions of maya, I’m having success getting the frame information, but not using it in an appropriate way to run the script, I’m researching mel now but my experience lies with python

some example scripts of what I’m trying to do that I have seen work in the script editor in earlier versions of maya:

float $transx;
float $mult;

$transx = go2.tx - ('getAttr -t (frame -3) go2.tx');
if ($transx > .1) $mult =;
else #mult = * 1.3;

go2.tx = ($mult * ('getAttr -t (frame -3) go2.tx'))+3;

or preferably:

go2.tx = 'getAttr -t (frame-('
go3.tx = 'getAttr -t (frame-(*2))go1.tx'

I’m just trying to get ‘go2’ to repeat the animation that ‘go1’ has made with ‘drive’ frames as a delay amount
and multiplying that number for ‘go3’

I could simply use the frameCache node but it won’t update the number of frames via an attribute, will it?

thanks in advance to anyone who can help!

Edit: I did figure out how to achieve it through utility nodes immediately after posting