If function Question

Hello,

Is there a way to say:

if(boolean has == false for 2 seconds){
   //do something
}

Not sure if there is a simple solution, but any help would be appreciated. (This is wihtin an Update Function)

Thanks

Are you trying to determine if a boolean is false for two seconds? If so, just create a timer within your script for holding how long it is false for.

if(has == false) (add delta time to timer) else (has ==true) reset timer to 0.

if(timer > 2 seconds) (do stuff)