Click and Hold button in Perspective

I would use a normal button with scripts placed in the onMouseDown, onMouseUp, and onMouseLeave Events, in conjunction with a custom property: Button.custom.clickReleased

onMouseDown:

self.custom.clickReleased = False

# Untested in live environment - might require slight tweaks
def confirm_if_click_held():
    from time import sleep
    sleep(1)
    if not self.custom.clickReleased:
        # logic here

system.util.invokeAsynchronous(confirm_if_click_held) # note no parens

onMouseLeave AND onMouseUp:

self.custom.clickReleased = True
2 Likes