Let me start off by saying that I'm new to Love and Lua in general.
What I'm trying to do is simply find a way to load multiple images without having to use love.graphics.newImage multiple times. All images would be numbered 1-100. I'm posting this is frustration because this seems so simple and my attempts at finding an answer searching have been futile. If you could help me I would greatly appreciate it!
Question about loading multiple Images.
Re: Question about loading multiple Images.
Try storing the images in a table and loading them with a loop. For example:
This will load 100 images named IMAGENAME1.png through to IMAGENAME100.png, you can change the name an extension of the image to match the images you want to load
Code: Select all
local images = {}
function love.load()
for i=1,100 do
images[i] = love.graphics.newImage("IMAGENAME"..i..".png")
end
end
Your screen is very zoomed in...
Re: Question about loading multiple Images.
Thank you very much! this was exactly what I was looking for.
Re: Question about loading multiple Images.
Offtracking though, you might want to post those kinds of questions to support. The question's more appropritate there. Not that I'm against you, it's just more suitable there.
*If you get offended, no offense.
*If you get offended, no offense.
~ CRxTRDude || Will be out of touch for a wee longer than expected. Will keep in touch with soon enough. Sorry bout that.
Who is online
Users browsing this forum: No registered users and 1 guest