#clicking in an even rhythm

1 messages · Page 1 of 1 (latest)

waxen sphinx
#

any ideas on how i would go about making a system that tracks if someone m1s in an even rhythm/at a set time kinda like a rhythm game

waxen sphinx
mossy pond
# waxen sphinx Yes exactly that

I set up a timer after the attack animation plays to set a bool to true then to false
If the next attack is played while that variable is true, it will play the sound and special effects

waxen sphinx
mossy pond
#

Only this time check if the bool is true or not

stone mountain
#

Either animation ended or

#

Use tick()

#

So you have a cool down, last used etc

stone mountain
waxen sphinx
waxen sphinx
stone mountain
#

If I was on my PC I'd type you something

#

Maybe soon

stone mountain
#

--debounce not needed but good measure
local coolDown = 0.5 --seconds
local lastAction = 0 --needed for first time use
local function testCoolDown()
    --if our action is faster than our cooldown, return end.
    if os.clock() - lastAction < coolDown then return end
    
    if whateverInput then
        lastAction = os.clock() --update our current use in seconds
        --do action here
        
    end
end
#

@waxen sphinx

stone mountain
#

oh and probably add a uh

#

window of time for a rythym thing idfk

#

cause i misread the question at first