Are you not supposed to press key "e" to start spawning things ?Miken1 wrote:Just getting a gray screen, is it working for you?
Creating new instances
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- Roland_Yonaba
- Inner party member
- Posts: 1563
- Joined: Tue Jun 21, 2011 6:08 pm
- Location: Ouagadougou (Burkina Faso)
- Contact:
Re: Creating new instances
Re: Creating new instances
Yes exactly but I only get a grey screen, also, nothing happens when I press E.
- Roland_Yonaba
- Inner party member
- Posts: 1563
- Joined: Tue Jun 21, 2011 6:08 pm
- Location: Ouagadougou (Burkina Faso)
- Contact:
Re: Creating new instances
This .love is working fine for me. When pressing "e", it spawns a new object at the location where the mouse is.
- Attachments
-
- Platformer.love
- (9.35 KiB) Downloaded 74 times
Re: Creating new instances
Strange, it's working now but rest of my "game" is not drawing! like the player and stuff
- Roland_Yonaba
- Inner party member
- Posts: 1563
- Joined: Tue Jun 21, 2011 6:08 pm
- Location: Ouagadougou (Burkina Faso)
- Contact:
Re: Creating new instances
In can see there's nested love.draw callbacks. It shouldn't.
Remove the inner love.draw, and it should go well, like this:
Code: Select all
function love.draw()
-- some code
function love.draw()
-- some other code
end
-- some code again
end
Code: Select all
function love.draw()
-- some code
-- some other code
-- some code again
end
Re: Creating new instances
Ah i see, all fixed up now!
This is the last question, promise.
I saw this guy on youtube and he is changing values while the program is running, how?
This is the last question, promise.
I saw this guy on youtube and he is changing values while the program is running, how?
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: Creating new instances
That's probably a bit advanced for you at the moment (no offense) but here's my guess.Miken1 wrote:Ah i see, all fixed up now!
This is the last question, promise.
I saw this guy on youtube and he is changing values while the program is running, how?
I'm guessing that he's using [wiki]love.filesystem.getLastModified[/wiki] to detect changes on the file. If the date changes, he reloads the file in a string with [wiki]love.filesystem.read[/wiki] and since it's a shader, he just reapplies the shader. You will not be loading a shader, but lua code, so will probably want to use [wiki]love.filesystem.load[/wiki] instead of read.
When I write def I mean function.
Re: Creating new instances
*Running away*
Thanks!
Thanks!
Who is online
Users browsing this forum: Bing [Bot], Google [Bot], Semrush [Bot] and 4 guests