01-12-2010 11:19 AM
I need the boolean when it changes from false to true and remain true to execute a group of elements once. When it remains true, I want it not to exectute these elements. Is there a possible way without using event structures. Any suggestions
Solved! Go to Solution.
01-12-2010 11:39 AM
So when the button is pressed, you want to execute the code EXACTLY ONCE, correct?
Use a shift register to keep track of how many iterations the boolean has been true.
If it has been true for anything greater than 1 iteration, do not execute the code again.
01-12-2010 11:41 AM
shrek'sdonkey wrote:I need the boolean when it changes from false to true and remain true to execute a group of elements once. When it remains true, I want it not to exectute these elements. Is there a possible way without using event structures. Any suggestions
place "group of elements to execute once" in the True case of a boolean case select. Put null code in the false case. Place a while loop around the case structure (remeber to create a stop button.) Set your execute button mechanical action to Latch when pressed and wire it from inside the loop to the selection terminal of the case.
Each time the "execute" button is pressed your true case executes once until the Stop button is pressed
01-12-2010 11:51 AM - edited 01-12-2010 11:55 AM
Ta DA
Hmmmm..... Snippet converts string "Property node" to a generic property node and adds a referance to String (why 2 tunnels?
01-12-2010 12:02 PM - edited 01-12-2010 12:03 PM
If the Boolean stays true and you don't want to execute the case until it changes back to false and then true again, you could do this:
01-12-2010 12:17 PM
01-12-2010 12:26 PM
01-12-2010 01:02 PM