benttoenail 0 Posted September 6, 2019 (edited) Simple problem, cannot find the solution. I need to set an attribute based on the current frame, something like this: if(@Cd.r >= 0.9){ f@t = @Frame; } ...and I need @t to hold that value, and not change along with the current frames. Why I need this: I'm trying to control the offset of animated redshift instances by starting the animation once @Cd.r passes a certain threshold. Once the animation starts, the counter for that specific instanced object needs to start at 0, and increase along with the time slider, like so: @f = @Frame - @t; string frameNumber = sprintf("%g%", @f); s@instancefile = concat("$HIP/filepath.", framenumber, ".rs"); Any idea on how to do this? Edited September 6, 2019 by benttoenail Share this post Link to post Share on other sites
Atom 1,208 Posted September 6, 2019 (edited) What I have done before is to pre-generate the start and end frame, then only generate a valid s@instancefile, when I am within that frame range. Use a null based geo file to reference in all other cases. if((@Frame>@start) && (@Frame<@end)){ int current_frame = @Frame-@start; s@instancefile = sprintf("myfile_%02d.rs",current_frame); } else { s@instancefile = "my_blank.rs"; } Edited September 6, 2019 by Atom Share this post Link to post Share on other sites
tamagochy 61 Posted September 6, 2019 use sop solver to hold this value by checking if @t already >0 Share this post Link to post Share on other sites
Dubtronics 2 Posted February 18 Hey did you manage to get a system working for this? I am trying out the two suggestions above. Share this post Link to post Share on other sites