Its position is the center of the screen at
posx = 400- 16 --x co-ordinate
posy = 300 - 16 --y co-ordinate
I chucked some stuff in the love.update so that when I click somewhere the position is updated and the image p.png is drawn where I clicked.
Code: Select all
-- this is the start up script
function love.load()
pos = love.graphics.newImage("p.png")
love.graphics.setBackgroundColor(0,0,0)
posx = 400 - 16
posy = 300 - 16
end
function love.update(dt)
function love.mousepressed(x,y,button)
if button == "1" then
posx = x
posy = y
end
end
function love.draw()
love.graphics.draw(pos,posx,posy)
end
end
How else can you continuously check for input, it made sense that you will need to do that sort of thing in an update script.
Thanks, I'm sure its some small glitch somewhere though...