Jump to content
Sign in to follow this  
RVA8

(possibly dumb) Xpresso question

Recommended Posts

Hey all,

 

I've got what will hopefully be an easy Xpresso question. I need to have Xpresso determine a random point on an object for a random duration then, at the end of that duration, pick another random point on the same object for another random duration and keep going. I know enough Xpresso to be dangerous, but I'm stumped on this one since it seems I can't feed the result at the end of my node chain back into the beginning. I can determine the random point just fine. I can determine a random duration with no problem. The problem is that when I use a noise node it keeps generating random numbers on every frame. I can't seem to get just one random number for a set period of time.

 

Anyone have any ideas? Thanks!

 

R

Share this post


Link to post
Share on other sites

Xpresso is evaluated at least once per frame.

What you need is to determine when it should be active an when not. Some kind of modulo operation on the frame number is an option for example. With that bool value you enable/disable the last node that does the final assignement.

Take a look here http://www.bonkers.de/xpa/xpgoodies.html for the ray collision example, i use the bool value of the ray collision to enable the control objects node.

Share this post


Link to post
Share on other sites

That makes sense. What I would like to do is, say, have a node that compares the current time to the randomly determined target time. Once the timeline reaches the target time to then trigger a boole to turn on the node that randomizes the point index. At the same time, once that new index is determined it should restart the process and a new target time should be created. I have most of this working. My problem seems to come when it's time to restart the process. It wants to keep going because I have no way of shutting the triggering boole value off again and generating a new target time.

 

R

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...