Back to the first frame

From Interaction Station Wiki
Revision as of 09:38, 21 November 2022 by Annasa (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
1if (vals[0]>40){
2imgInSeq= (imgInSeq+1) % numImages;
3}else{
4  imgInSeq=1;
5}


and after each sound trigger, if you want processing to finish playing the entire sequence before go back to the first frame:

you can take a look at this:

1if (vals[0]>40){
2imgInSeq= (imgInSeq+1) % numImages;
3}else{
4  if(imgInSeq>5 && imgInSeq<97){
5  imgInSeq= (imgInSeq+1) % numImages;
6}else{
7  imgInSeq=1;
8  }
9}