So I have a sprite which I want to make it having an attack pattern each time I pressed on attack button. I want to use onComplete function but it doesn’t call anything. I get this idea from chatGPT. I don’t get it why onComplete doesn’t get called. I already put my sequence loopCount = 1.
function Hero:playAttSeq()
print("wooooo")
print(#attackpattern)
print(json.prettify(attackpattern))
Hero:setSequence("attack-"..attackpattern[1])
Hero:play({ onComplete = function() print("done") end})
end