Ankit Sinha Posted September 4, 2012 Share Posted September 4, 2012 (edited) 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 September 5, 2012 by Ankit Sinha Quote Link to comment Share on other sites More sharing options...
old school Posted September 4, 2012 Share Posted September 4, 2012 if(ch("event1")==1, if(ch("event2")==1, $F, 0), 0) Quote Link to comment Share on other sites More sharing options...
Ankit Sinha Posted September 5, 2012 Author Share Posted September 5, 2012 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......................... Quote Link to comment Share on other sites More sharing options...
Macha Posted September 5, 2012 Share Posted September 5, 2012 So you want it to be history dependant? Try it in a sopsolver and see if it works. Quote Link to comment Share on other sites More sharing options...
sadhu Posted September 5, 2012 Share Posted September 5, 2012 Here is one of the ways using solver sop. sop_solver_soln.hipnc Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.