Ah...That's because that's different: apparently, the love.graphics.draw() function accepts nil as 0.
Search found 6 matches
- Sun Oct 31, 2010 6:02 pm
- Forum: Support and Development
- Topic: How do you get the x and y positions of an image?
- Replies: 12
- Views: 10254
Re: How do you get the x and y positions of an image?
- Sun Oct 31, 2010 4:14 pm
- Forum: Support and Development
- Topic: How do you get the x and y positions of an image?
- Replies: 12
- Views: 10254
Re: How do you get the x and y positions of an image?
Well, they're not nil if you assign a value (other than nil) to them first, yes. :P local image function love.load() image = love.graphics.newImage("Images/smiley.png") love.graphics.setBackgroundColor(50,50,255) end function love.draw() love.graphics.draw(image,imgx,imgy) end That doesn'...
- Sat Oct 30, 2010 8:24 pm
- Forum: Support and Development
- Topic: How do you get the x and y positions of an image?
- Replies: 12
- Views: 10254
Re: How do you get the x and y positions of an image?
It wasn't nil when I used it in something other than love.update.Exactly. There is nothing magic about imgx and imgy
- Fri Oct 29, 2010 6:26 pm
- Forum: Support and Development
- Topic: How do you get the x and y positions of an image?
- Replies: 12
- Views: 10254
Re: How do you get the x and y positions of an image?
Oh, I didn't know that. Thanks!On the first call to love.update, imgx and imgx are not set. Their value is, literally, nil.
- Fri Oct 29, 2010 5:43 pm
- Forum: Support and Development
- Topic: How do you get the x and y positions of an image?
- Replies: 12
- Views: 10254
How do you get the x and y positions of an image?
Hey, I've been using Lua for ages and I'm quite advanced, but I've just started using LOVE2D and seem to have got stuck at the first hurdle. :ehem: I thought you could use 'imgx' and 'imgy', but that doesn't seem to be working with my newest script. I swear imgx and imgy worked for my last script, b...
- Fri Oct 29, 2010 5:37 pm
- Forum: Support and Development
- Topic: Error creating Hello World game
- Replies: 15
- Views: 6319
Re: Error creating Hello World game
I suggest using Notepad++, if you have Windows. It has support for many different languages, including Lua.