Hopefully GregBug or someone else here may know this.
Here's the problem:
1) A player presses fire button A
2) Then presses pause
3) Part of my pause routine is to call vPad:stop()
4) They then release fire button A
5) Then unpause the game
vPad thinks that fire button A is still being pressed.
Is there a way to say 'reset all vPad input' or to 're-check if any buttons are pressed'?
Thanks!
Tom
Comments
Website: http://www.castlegateinteractive.com
https://play.google.com/store/apps/developer?id=Castlegate+Interactive
The problem is there's another part of the game where the game pauses when the player hits an exit and is asked 'would you like to exit?'
If they were pressing up when they hit the exit, and touch 'no' to keep exploring that level, the character fly upwards - regardless of whether they are still pressing up.
There's a way round this but I can't figure it out.
When a key up event occurs during pause and the key state is this key was pressed when the player hit pause then process the key up event as normal (as though you aren't paused) and then clear the this key was pressed when player hit pause flag. This should solve your problem I think.
Website: http://www.castlegateinteractive.com
https://play.google.com/store/apps/developer?id=Castlegate+Interactive