Time-based Proximity Limit in a scripted controller: static value possible?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello friends, I'm sure someone smarter than me can answer this, and thanks for listening.
What I want to do is this:
Two nodes, A and B.
When A and B get too close to each other (distance A B < threshold), the limiter keeps them from getting any closer, using their distance from the previous frame.
So my idea is to store the current frame number (currenttime) in a Custom Attribute. Then use the at time command to set the position.
But how do I keep this stored frame number from incrementing? This script will be evaluated every frame. So I need to be able to store that frame number someplace where the script can't write over it as it moves on.
I hope I'm making sense? Any and all advice would be greatly appreciated. I've been trying lots of schemes, but I'm stumped on this one so far.
Thanks very much in advance.