Yeah, that's better.miko wrote:You may prefer love.keypressed() instead.
Search found 37 matches
- Thu Jan 05, 2012 12:27 pm
- Forum: Support and Development
- Topic: os.execute and printing text [Solved]
- Replies: 10
- Views: 5457
Re: os.execute and printing text
- Thu Jan 05, 2012 11:20 am
- Forum: Support and Development
- Topic: os.execute and printing text [Solved]
- Replies: 10
- Views: 5457
Re: os.execute and printing text
If anyone else is interested in something similar, here's the solution:
Add " &" to the end of your command line. This worked for me. And you might want to use love.keyreleased to call the command, that way it runs once.
Add " &" to the end of your command line. This worked for me. And you might want to use love.keyreleased to call the command, that way it runs once.
- Thu Jan 05, 2012 8:43 am
- Forum: Support and Development
- Topic: os.execute and printing text [Solved]
- Replies: 10
- Views: 5457
Re: os.execute and printing text
Okay then.
- Thu Jan 05, 2012 8:40 am
- Forum: Support and Development
- Topic: os.execute and printing text [Solved]
- Replies: 10
- Views: 5457
Re: os.execute and printing text
Nope, same result. If I could show the text before the command, that would be okay too.MarekkPie wrote:update() has to end before draw() can be called. Try putting the isDown(" ") in draw(). It probably won't be simultaneous, but it will be quicker than the above.
- Thu Jan 05, 2012 8:15 am
- Forum: Support and Development
- Topic: os.execute and printing text [Solved]
- Replies: 10
- Views: 5457
Re: os.execute and printing text
I also tried
The result is the same.
Code: Select all
f = io.popen("espeak "..text)
f:close()
- Thu Jan 05, 2012 7:39 am
- Forum: Support and Development
- Topic: os.execute and printing text [Solved]
- Replies: 10
- Views: 5457
os.execute and printing text [Solved]
Hello. I have a little problem. I want my program to execute a Linux command when I press space, and it works fine. But I want to show a text when command is executed. But my program shows the text "after" it completes the work of the command. Can't I do them simultaneously? Here's the cod...
- Wed Jan 04, 2012 8:10 am
- Forum: Games and Creations
- Topic: One Way To Go
- Replies: 30
- Views: 15052
Re: One Way To Go
Thanks!spirulence wrote:This is quite a lot of fun! Kudos.
- Tue Jan 03, 2012 5:43 pm
- Forum: Games and Creations
- Topic: One Way To Go
- Replies: 30
- Views: 15052
Re: One Way To Go
The relative velocity (the velocity at each call) will change. But when you sum the displacement between your position at t = 0 and your displacement at t = 1, it will equal your velocity in pixels/second. If you simply go, x = x + velx, then your velocity is in pixels/dt, which is 1/dt times faste...
- Tue Jan 03, 2012 5:36 pm
- Forum: Games and Creations
- Topic: One Way To Go
- Replies: 30
- Views: 15052
Re: One Way To Go
I checked the game on another computer, and it works fine. It seems that it's a hardware problem on my side.
- Tue Jan 03, 2012 5:10 pm
- Forum: Games and Creations
- Topic: One Way To Go
- Replies: 30
- Views: 15052
Re: One Way To Go
Anyway, robin explained it well, you define your speed as pixels per second, then multiply it by dt (every frame) to get the distance traveled between the frames. So: --somewhere, when the speed is set velx = 200 -- pixels per second --and the starting x position of your object x = 15 --in update x...