This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
CaosTECH's profile picture

How to make my program refresh itself constantly

Started by CaosTECH, 02 January 2016 - 01:30 AM
CaosTECH #1
Posted 02 January 2016 - 02:30 AM
Hey, I have a question. As it says in the title… Im making my game to be better, and to do that I wanted to implement a way to make the game refresh itself without the character actually doing anything. Like now the game only refreshes when a key is pressed. I wanted to make it to where it refreshes or buffers, automatically without the player doing anything. This would also support the idea of having mobs and animated pixels/moving pixels

If you want I can post the code, but im not going to unless necessary because its a secret project. So if I did need to post the code, I would probably only post the part that im having trouble with or… yeah





Thanks in advance
Bomb Bloke #2
Posted 02 January 2016 - 02:46 AM
Take a look at the examples for os.startTimer().
Creator #3
Posted 02 January 2016 - 08:44 PM
With timers: you basically wait for an event. If the timer comes first, you handle the timer, else, you cancel the timer and handle.other input.
CaosTECH #4
Posted 02 January 2016 - 08:48 PM
Im looking at the wiki page for it… this actually might help. Now just to see how to implement it into the code. Thanks! I appreciate it :D/>