like if you want it to work whenever guy touches button and stop after 2 sec then just deactivate it earlier (or do server setting switch_open (NUM)) and do a activate for 2 sec button(edited)
19:37
you can find any map having it and open map in editor to see how it's done