Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help,
read this .
Noktai
Prole
Posts: 7 Joined: Tue Sep 11, 2012 2:25 am
Post
by Noktai » Sat Sep 15, 2012 5:28 pm
Hello,
I'm currently working on a game for the adventuretime gamejam and am in quite a hurry to get the xbox 360 controller working. All the buttons seems to be working fine, but I don't know how to get input from the dpad and/or analog sticks.
I've read that the triggers won't work properly if you're not using Xinput, but I don't need those haha.
These all seem to report 0:
Code: Select all
print("number of axis " .. tostring(love.joystick.getNumAxes(0)));
print("number of balls " .. tostring(love.joystick.getNumBalls(0)));
print("number of hats : " .. tostring(love.joystick.getNumHats(0)));
But I've read some old topics where people got everything but the triggers to work with the standard love2d joystick class.
Thanks in advance
Nixola
Inner party member
Posts: 1949 Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy
Post
by Nixola » Sat Sep 15, 2012 5:37 pm
love.joystick.getNumAxes(1)
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
Noktai
Prole
Posts: 7 Joined: Tue Sep 11, 2012 2:25 am
Post
by Noktai » Sat Sep 15, 2012 5:56 pm
Nixola wrote: love.joystick.getNumAxes(1)
Doh, the lua indexing got me again. Thanks a bunch !
Users browsing this forum: No registered users and 4 guests