Thanks, I guessed that it is possible using that, but I was not sure and have not used it yet. Is the löve particle system löve-specific? Just wondering whether I can look at general particle system tutorials or löve specific ones.
As a sort of extension to this question: I have a game idea that would require lots of small pieces flying around, but physics based or pseudo physics based. Can this also be achieved using a particle system or do I need to use an actual physics engine (or at least collisions and simplified physics) for each tiny thingy?
"Questions that don't deserve their own thread" thread
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: "Questions that don't deserve their own thread" thread
how do you access files from the save directory (im using windows so appdata)?
if the file is inside the source folder, you just have to do is: but what will i do if the file is in the save directory?
if the file is inside the source folder, you just have to do is:
Code: Select all
fileLoc="(folder if theres any)/file.jpg"
Re: "Questions that don't deserve their own thread" thread
You access it the same way. Files in the save folder are checked before the files in the .love our source folder.
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
Re: "Questions that don't deserve their own thread" thread
why do i get a not exist error message when i try to load the image from the save directory?Nixola wrote:You access it the same way. Files in the save folder are checked before the files in the .love our source folder.
file location: appdata/roaming/love/svdir/imageX.jpg
Code: Select all
love.filesystem.setIdentity("svdir")
src = "imageX.jpg"
image = love.graphics.newImage(src)
- HugoBDesigner
- Party member
- Posts: 403
- Joined: Mon Feb 24, 2014 6:54 pm
- Location: Above the Pocket Dimension
- Contact:
Re: "Questions that don't deserve their own thread" thread
If you're running an executable (rather than a .love file), then the file location would be Appdata/Roaming/svdir/imageX.jpg
But if not, could you post a picture of your imageX.jpg file with the location on top? And the part of the code responsible for loading it. Just to make sure there aren't any typos or anything like that...
But if not, could you post a picture of your imageX.jpg file with the location on top? And the part of the code responsible for loading it. Just to make sure there aren't any typos or anything like that...
Re: "Questions that don't deserve their own thread" thread
i finally solved it tnx. i made a stupid mistake by declaring imageX before declaring love.filesystem.setIdentity("svdir"). its ok nowHugoBDesigner wrote:If you're running an executable (rather than a .love file), then the file location would be Appdata/Roaming/svdir/imageX.jpg
But if not, could you post a picture of your imageX.jpg file with the location on top? And the part of the code responsible for loading it. Just to make sure there aren't any typos or anything like that...
- FroggestSpirit
- Prole
- Posts: 11
- Joined: Tue Jan 26, 2016 7:13 pm
Re: "Questions that don't deserve their own thread" thread
Does anyone know if you can have music and code run while an android screen is off? I want to make a music player, but I'm guessing that the feature would be in the code-runner itself if it exists (maybe a way to toggle it?)
This isn't easy to say, but…
Re: "Questions that don't deserve their own thread" thread
Can someone tell my why the output is always printed backwards if I do this:
Consoles output:
last 3
middle 2
first 1
Code: Select all
function love.load()
listy = {first = 1, middle = 2, last = 3}
for i, v in pairs(listy) do
print(i, v)
end
end
function love.update(dt)
end
function love.draw()
end
last 3
middle 2
first 1
Re: "Questions that don't deserve their own thread" thread
Pairs doesn't have a defined order. If you need them to be printed in a specific order, use a sequence and ipairs. Two examples:
Code: Select all
--do this if you need textual indices in listy;
function love.load()
listy = {first = 1, middle = 2, last = 3}
order = {"first", "middle", "last"}
for i, v in ipairs(order) do
print(v, listy[v])
end
end
function love.update(dt)
end
function love.draw()
end
Code: Select all
--do this if you don't
function love.load()
listy = {1, 2, 3}
for i, v in ipairs(listy) do
print(i, v)
end
end
function love.update(dt)
end
function love.draw()
end
Last edited by Nixola on Thu Jan 28, 2016 5:22 pm, edited 1 time in total.
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
- HugoBDesigner
- Party member
- Posts: 403
- Joined: Mon Feb 24, 2014 6:54 pm
- Location: Above the Pocket Dimension
- Contact:
Re: "Questions that don't deserve their own thread" thread
@Nixola I think you meant to use 'ipairs' on the first function example, rather than 'pairs'
Who is online
Users browsing this forum: Bing [Bot] and 3 guests