Created
April 7, 2021 22:38
-
-
Save UnaiM/b5f803f1782baf2ae899d6d1d65dc48f to your computer and use it in GitHub Desktop.
Example of a question in the OBS Discord community
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local elapsed = 0 | |
function script_properties() | |
local props = obslua.obs_properties_create() | |
obslua.obs_properties_add_bool(props, 'foo', 'Foo') | |
return props | |
end | |
function script_tick(seconds) | |
if elapsed then | |
elapsed = elapsed + seconds | |
if elapsed > 2 then | |
elapsed = nil | |
-- Tick the 'foo' checkbox. | |
end | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
elapsed = 0 | |
def script_properties(): | |
props = obspython.obs_properties_create() | |
obspython.obs_properties_add_bool(props, 'foo', 'Foo') | |
return props | |
def script_tick(seconds): | |
global elapsed | |
if elapsed is not None: | |
elapsed += seconds | |
if elapsed > 2: | |
elapsed = None | |
# Tick the 'foo' checkbox. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment