This site requires JavaScript, please enable it in your browser!
Greenfoot back
murphys
murphys wrote ...

2014/1/15

Gamepad

murphys murphys

2014/1/15

#
I have successfully used an xbox controller to play the zombie shoot scenario and am now looking to develop a scenario myself. Unfortunately I am finding the documentation difficult to understand and I have not successfully worked out from the zombie scenario which code controls the player. Would it be possible to provide a simple piece of generic code that would, for example, move an actor left if the left button was pressed (or joystick was moved left). I hope I can work out the other functions from there. Many thanks in advance.
davmac davmac

2014/1/15

#
Have you tried reading the documentation and calling some methods of the GamePad class?
murphys murphys

2014/1/15

#
I'm sorry if this sounds facetious but I couldn't have found the "documentation difficult to understand" if I hadn't tried reading it.
davmac davmac

2014/1/15

#
Right! (facepalm). Sorry. Can you be more specific about what parts of it you have difficulty with? Have you tried writing some code which just calls a couple of the methods? Is it that you don't understand how to call the methods, or you're not sure what they do exactly?
You need to login to post a reply.