So I've got a loop which I want to go back and forth each time the mouse clicks on an object. So with every click, the InvertMeasure of the loop is changed, the loop is updated.
I have this code at the minute, and I have no idea why it isn't working
RichKat666 wrote: ↑January 14th, 2020, 6:07 pm
I have this code at the minute, and I have no idea why it isn't working
Because there is a small mistake into the !SetVariable bang of the LeftMouseDownAction option of the [CentreShape] meter. As used, it sets the InvertExpansion variable not to the appropriate numeric value, but to the TempVar string itself, because in such cases the bang don't know you want to set the appropriate numeric value and TempVar is a string which is set to the variable. You have to use the name of the [TempVar] measure as a section variable, so modify the above option as it follows: LeftMouseDownAction=[!UpdateMeasure TempVar][!SetVariable InvertExpansion "[TempVar]"][!UpdateMeasure "ExpansionLoop"].
Also note that the brackets are not needed around the name of the [ExpansionLoop] measure in the !UpdateMeasure bang (fixed this as well).