Search found 6 matches

by pighead10
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: 10534

Re: How do you get the x and y positions of an image?

That's because that's different: apparently, the love.graphics.draw() function accepts nil as 0.
Ah...
by pighead10
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: 10534

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'...
by pighead10
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: 10534

Re: How do you get the x and y positions of an image?

Exactly. There is nothing magic about imgx and imgy
It wasn't nil when I used it in something other than love.update.
by pighead10
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: 10534

Re: How do you get the x and y positions of an image?

On the first call to love.update, imgx and imgx are not set. Their value is, literally, nil.
Oh, I didn't know that. Thanks!
by pighead10
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: 10534

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...
by pighead10
Fri Oct 29, 2010 5:37 pm
Forum: Support and Development
Topic: Error creating Hello World game
Replies: 15
Views: 6474

Re: Error creating Hello World game

I suggest using Notepad++, if you have Windows. It has support for many different languages, including Lua.