ive run into some little problem, looked through forum and wiki, but cant anything.
so, i cant seem to get my controller to get the player to jump . got it to move, no problem. but the buttons are not working to the same standard as say the d-pad
this is the code im using. bear in mind im giving both jump code for sharing with [or command] the keyboard and by itself. i just uncommented for this post.
though feel its an easy answer in the end
Code: Select all
function player:jumping(key)
if key == ' ' or joyStick:isGamepadDown('a') then
if self.jump then
self.speedY = self.jumpSpeed
self.jump = false
end
end
--second jump
if joyStick:isGamepadDown('a') then
if self.jump then
self.speedY = self.jumpSpeed
self.jump = false
end
end
end