Jump to content

static value over multiple frames in vex based on time


MoteOne

Recommended Posts

Hi everybody,

i'm trying to get a random value every nth frame. For example on Frame 5, 10, 15 etc it should change but in between it should remain static.

i tried:

int t = int(@Frame%5);
float random=0;
if(t == 4){
    random = rand(@Frame);
    }
f@random = random;

 

and i just tested if I could append a random value to an array if @Frame%5, but it alwys removes that value after the condition is met.

2nd question would be how to implement a timer? for example over the next 5 Frames add a value to a variable.

 

Any advice would be awesome. Thx in advance

 

 

Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

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.

×
×
  • Create New...