Hey, Brent, I added a flag just like you said, But I haven’t been having much luck, here are the modifications:
local function checkVelocities() local vx, vy = anim:getLinearVelocity() local stopped = (vx ^2 + vy ^2 \<= 1) local stoppedvy = (vy ^2 \<= 0.5) if stopped == true and anim.sequence ~= "idle" then idle() end if stoppedvy == true then anim.isJumping = false else anim.isJumping = true if anim.sequence ~= "jump" then anim:setSequence("jump") anim:play() end end end local function makeControls(self, event) if event.phase == "began" then if self.name == "left" and anim.isJumping == false then walk(-1) elseif self.name == "right" and anim.isJumping == false then walk(1) end elseif event.phase == "ended" or event.phase == "cancelled" then idle() end return true end
Also, recall, that the jump is now a touch listener on the screen not on a button.
If I am doing something wrong, can you please say so? (In case, that sounded rude, it’s not, I really appreciate your help) Thank you. Right now the problem is problem #2. I have not tested #1 yet, as I need Live Builds to replicate it.