Help with setup
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- Casual_Keldeo
- Prole
- Posts: 3
- Joined: Fri Jan 27, 2017 2:40 am
Help with setup
I am trying to test the 'newImage' function, to start out. BUT, the script isn't reading the .png image that I set. Did I set up something wrong? What can I do to resolve the issue? Take a look at the screenshot provided: http://prntscr.com/e0v6ok
Re: Help with setup
Your image is in the graphics directory. Adjust your path like this:
Code: Select all
hamster = love.graphics.newImage("graphics/hamster.png")
- Casual_Keldeo
- Prole
- Posts: 3
- Joined: Fri Jan 27, 2017 2:40 am
Re: Help with setup
Thank you very much. I now have an issue with loading sounds. I adjusted the sourcecode provided by the website to access the audio directory (if thats even a thing), but no luck. Whats the issue here?Ikroth wrote:Your image is in the graphics directory. Adjust your path like this:Code: Select all
hamster = love.graphics.newImage("graphics/hamster.png")
Screenshot of code + layout: http://prntscr.com/e1bd0q
-
- Party member
- Posts: 548
- Joined: Wed Oct 05, 2016 11:53 am
Re: Help with setup
In your code you have "bullet_fire.ogg", when the actual filename is "bulletfire.ogg".
Also, should it ever become an issue, be aware that you should write the file paths as exact. ie. use same casing style as in the path.
Also, should it ever become an issue, be aware that you should write the file paths as exact. ie. use same casing style as in the path.
- Casual_Keldeo
- Prole
- Posts: 3
- Joined: Fri Jan 27, 2017 2:40 am
Re: Help with setup
Thanks for pointing out the silly error, but after adjusting, its still not loading in. Whats the issue here, am I loading in the sound at the incorrect time? I want the sound to play when the player fires a bullet.MrFariator wrote:In your code you have "bullet_fire.ogg", when the actual filename is "bulletfire.ogg".
Also, should it ever become an issue, be aware that you should write the file paths as exact. ie. use same casing style as in the path.
Screenshot: http://prntscr.com/e1h27v
- zorg
- Party member
- Posts: 3465
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: Help with setup
You shouldn't put love.load inside love.draw; move it out of that function. (Also i hope you only have one love.load)
Also, you'll need more than one source if you need to sound more than one bullet simultaneously.
Thankfully, creating a source once, then cloning it with [wiki]Source:clone[/wiki] is easy.
Also, you'll need more than one source if you need to sound more than one bullet simultaneously.
Thankfully, creating a source once, then cloning it with [wiki]Source:clone[/wiki] is easy.
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Who is online
Users browsing this forum: Ahrefs [Bot], Amazon [Bot], Bing [Bot] and 1 guest