Right now I have a scene. When you shake it goes to the next scene.
This is my code for shaking.
local function onShake (event) if event.isShake then livesLabel.text = "Lives:" ..tostring(data.health) composer.gotoScene("levels.question4") end end Runtime:addEventListener("accelerometer", onShake)
After a few scenes past this one. If you shake the device it goes back and goes to question 4.
I want it so if you happen to shake the device after this question, you wont go back to this.