float script controller adjustable time delay

float script controller adjustable time delay

Anonymous
Not applicable
2,213 Views
7 Replies
Message 1 of 8

float script controller adjustable time delay

Anonymous
Not applicable

Hello friends, I have run into a problem.

 

I'm controlling a rotation through a float script and I want to delay execution of the script by a variable number of frames.

 

I know I can use tick offset but I can't see any way to adjust that outside of the script.

 

I'm trying to use

 

at time (currentTime - timeDelay )

 with timeDelay a variable pointing to a custom attribute spinner.

 

Can anybody tell me if this is possible? It's not working for me.

 

Thanks very much in advance.

0 Likes
2,214 Views
7 Replies
Replies (7)
Message 2 of 8

Anonymous
Not applicable

I would like to add some info: the time control problem is in a float script controller that is referencing ExposeTM helpers.

 

I'm not getting good results controling time delay with code or with tick offset, so I'm wondering if Float Script doesn't like time control with ExposeTM?

 

I did notice the Time Offset in the ExposeTM and it works, but the only way you can control the Time Offset from one spinner is to use wire parameters from one ExposeTM to the others.

 

The Time Offset for the ExposeTM is available for a controller in the track view, but i couldn't get it to work with a float script. i could make the script and reference a custom attribute in an attribute holder, and the script would evaluate to the number I wanted, but it just wouldn't affect the time offset in the animation when you play it. If you wire one ExposeTM to the others it does work.

 

Thank you for any advice.

0 Likes
Message 3 of 8

Anonymous
Not applicable

Okay then, skip it I guess. I'm using spring controllers but I sure wish I could find out why that other stuff didn't work.

 

Thanks anyway.

0 Likes
Message 4 of 8

Anonymous
Not applicable

Okay, for anybody that's interested:

 

I was trying to use syntax that works in a position script but doesn't work in a float script; in other words, I wanted to delay individual channels instead of the entire controller. Example: time delay the X pos and Y pos but not the Z. I was doing this:

 

at time (currentTime - offset)

Xpos

where

offset=an integer value on a custom attribute

Xpos=assigned to track referencing another item's X position

 

This did not work.

 

 

But it does work if I assign the Xpos variable to a node instead of a track, and I use this syntax:

 

at time (currentTime + offset)
Xpos.pos.controller.'X Position'

 again,

 

offset=an integer value on a custom attribute

 

but this time

Xpos-assigned a node instead of a track.

 

This is TOTALLY WEIRD but I'm glad I figured it out. If it's help to anybody, that's frosting on my cake.

 

Thanks for your attention.

 

 

 

 

 

0 Likes
Message 5 of 8

Anonymous
Not applicable
Next time maybe you should post something like this in the programming section? Just a suggestion 🙂
0 Likes
Message 6 of 8

Anonymous
Not applicable

Oh shoot, I didn't notice that MaxScript was under the heading of Programming. Thanks, you're absolutely right.

 

I think the format of the Area has changed. Didn't MaxScript used to be it's own category?

 

Oh well, lesson learned. And thank you again.

0 Likes
Message 7 of 8

Steve_Curley
Mentor
Mentor
I'll move this thread for you. Yes, it used to have a separate forum, but now Maxscript, Python and the SDK are all in one place - Programming.

Max 2016 (SP1/EXT1)
Win7Pro x64 (SP1). i5-3570K @ 4.4GHz, 8Gb Ram, DX11.
nVidia GTX760 (2GB) (Driver 430.86).

0 Likes
Message 8 of 8

Anonymous
Not applicable

Fantastic, thanks!!

0 Likes