Hello.
I want to get the accelerometer x.gravity only in a set time in my game (e.g. when I press a button), so I don’t want to have an event listener listening to it all the time.
I want to have something like
local function exampleFunction ()
if accelerometer.xGravity > exampleValue then
print(“success”)
end
end
What do I do??
thanks!