Jump to content

need expression help


Ankit Sinha

Recommended Posts

hi,

i have two parameter which becomes 1 on some specific event, otherwise they are 0. Event for both are different. when ch("event1")==1 && ch("event2")==1 then parameter should show frame number [ie, when they both became 1] until next frame where this condition is true again, in which case it should show new frame number[[ie, when they both became 1]]. Remember, value of parameter should change only on condition being true. Hope i m clear enough. Solution not necessarily be in expression, if there is any way to do it , ideas are welcome.

example of what i want

@ frame 43

ch("event1")==1&& ch("event2")==1 then value of parameter should be 43

@ frame 44

ch("event1")==1&& ch("event2")==0 then value of parameter should be 43

@ frame 45

ch("event1")==0&& ch("event2")==1 then value of parameter should be 43

@ frame 46

ch("event1")==1&& ch("event2")==1 then value of parameter should be 46

@ frame 47

ch("event1")==1&& ch("event2")==0 then value of parameter should be 46

@ frame 48

ch("event1")==0&& ch("event2")==1 then value of parameter should be 46

@ frame 49

ch("event1")==1&& ch("event2")==1 then value of parameter should be 49

and so on.........................

Edited by Ankit Sinha
Link to comment
Share on other sites

if(ch("event1")==1, if(ch("event2")==1, $F, 0), 0)

ok, may be i wasn't clear enough, this will give me the frame number when they both become 1, but it will again reset to 0 as soon either of the event become 0. I want it to show value of that frame number where they both became 1, if either of the event is zero, until both of the event again become 1, in that case it will show new frame number. I will explain with example below

@ frame 43

ch("event1")==1&& ch("event2")==1 then value of parameter should be 43

@ frame 44

ch("event1")==1&& ch("event2")==0 then value of parameter should be 43

@ frame 45

ch("event1")==0&& ch("event2")==1 then value of parameter should be 43

@ frame 46

ch("event1")==1&& ch("event2")==1 then value of parameter should be 46

@ frame 47

ch("event1")==1&& ch("event2")==0 then value of parameter should be 46

@ frame 48

ch("event1")==0&& ch("event2")==1 then value of parameter should be 46

@ frame 49

ch("event1")==1&& ch("event2")==1 then value of parameter should be 49

and so on.........................

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...