hi, so i been stuck on this for a while so maybe one of you can point how to approach this, i develop a OF app that activates some videos when a series of buttons are press via OSC when the video finish they are suppose to go back to a intro scene and wait for the next interaction, my issue comes when a user only press maybe one or two of the buttons then the app never goes back to the intro scene i can only make them come back when they press all the buttons so my approach until now is to try to store the states of each video in a array of bools
like this
void ofApp::videoStatus(){
for (unsigned int i = 0; i < players.size(); i++)
{
if (players[i].getIsMovieDone() ==true)
{
players[i].stop();
stado[i] =true;
}
}
and then my idea is to check if there are more than one similar value in the array so if there is they go back to intro scene like this
void ofApp::compareStatus(bool _stado[],int size){
int i,j;
printf("Repeating numbers are");
for ( i = 0; i < size; i++)
{
for ( j = i+1; j < size; j++)
{
if (_stado[i] == _stado[j])
{
cout<< _stado[i]<< " ";
//cout<<" mas de dos videos se acabaron"<<endl;
}
}
}
}
but if i do this it will set back to intro scene if the user took some time in pressing all the buttons has someone develop something similar how can i can make it wait for a while before resetting, should i use timers? maybe im overthinking this to much ?