8 posts
Posted 17 December 2012 - 06:22 PM
Hello! I've just made the hatch from "LOST" and am looking for some help with a countdown timer setup similar to that in the show.
For those who are not familiar with it:
It's a 108 minute countdown timer.
The code " 4 8 15 16 23 42" has to be entered in the last 4 minutes of the timer otherwise, well, something bad happens.
More info:
http://lostpedia.wik...Countdown_timerI have a single monitor setup connected to a single monitor via Redpower wire and regular redstone at the moment.
Looking forward to replies! Thx,
MG42MG34
1619 posts
Posted 17 December 2012 - 06:23 PM
Umm… What exactly is the problem?
8 posts
Posted 17 December 2012 - 06:26 PM
Umm… What exactly is the problem?
I only know how to make a password door.
1619 posts
Posted 17 December 2012 - 06:27 PM
Umm… What exactly is the problem?
I only know how to make a password door.
Please give more info. Post your current code, and any problems you are having.
8 posts
Posted 17 December 2012 - 06:29 PM
Umm… What exactly is the problem?
I only know how to make a password door.
Please give more info. Post your current code, and any problems you are having.
I currently have nothing, and am just looking for some way to do it / trying to find out if it's possible. No errors atm.
1619 posts
Posted 17 December 2012 - 06:32 PM
Umm… What exactly is the problem?
I only know how to make a password door.
Please give more info. Post your current code, and any problems you are having.
I currently have nothing, and am just looking for some way to do it / trying to find out if it's possible. No errors atm.
Look into timers on the wiki, then use coroutines to run the timer and wait for user input.
8 posts
Posted 17 December 2012 - 06:35 PM
Umm… What exactly is the problem?
How would I make user input only available during the last 4 mins of the 108 mins?
I only know how to make a password door.
Please give more info. Post your current code, and any problems you are having.
I currently have nothing, and am just looking for some way to do it / trying to find out if it's possible. No errors atm.
Look into timers on the wiki, then use coroutines to run the timer and wait for user input.
8 posts
Posted 17 December 2012 - 06:37 PM
Oops! bad post. Was saying….how would i make user input only available during the last 4 mins of the 108 mins. :)/>
7508 posts
Location
Australia
Posted 17 December 2012 - 06:37 PM
Umm… What exactly is the problem?
I only know how to make a password door.
Please give more info. Post your current code, and any problems you are having.
I currently have nothing, and am just looking for some way to do it / trying to find out if it's possible. No errors atm.
Look into timers on the wiki, then use coroutines to run the timer and wait for user input.
You love your coroutines don't you. You know that they aren't the solution to everything right?
8 posts
Posted 17 December 2012 - 06:43 PM
What I'm thinking is to have a 108 min countdown timer going at all times (on loop). Then have to input the code which is going to be a program that reset the 108 min timer (only available during the last 4 mins.)
7508 posts
Location
Australia
Posted 17 December 2012 - 06:51 PM
do what Dlcruz129 said and use a timer. I would have 2, one that times 104 mins, then the last one that times the 4 mins is triggered when the 104 one is done.
8 posts
Posted 17 December 2012 - 06:53 PM
do what Dlcruz129 said and use a timer. I would have 2, one that times 104 mins, then the last one that times the 4 mins is triggered when the 104 one is done.
This is all they have on timers on the wiki:
Event timer Fired when a timer completes. Returned Object 1 The timer's numerical representation value (returned when
os.startTimer() is initially called).
Function os.startTimer Adds a timer which will fire a "timer" event once after time seconds have passed. It returns a table which acts as a unique ID for the timer. Syntax os.startTimer(
float time) Returns
Table timerID Part of
ComputerCraft API
OS Event timer Fired when a timer completes. Returned Object 1 The timer's numerical representation value (returned when
os.startTimer() is initially called).
Also, how will I display the min&sec countdown timer (xxx:xx) on the monitor? Is it possible to connect a monitor and a Computer using redstone at all? lol
Probably not even possible, but It would be cool to have a alarm (
http://thetekkit.wik...ki/Howler_Alarm) start when the 4 min timer starts.
This all seems like Greek to me D:
7508 posts
Location
Australia
Posted 17 December 2012 - 07:09 PM
this is the basics of what they meant
when you start a timer like this
longTimer = os.startTimer(6) -- 6 seconds
and then it finishes it will trigger a system event which needs to be captured using
event, param = os.pullEvent()
or
event, param = os.pullEventRaw()
where event is "timer", "rednet_message", "key", "char" or a few others and the parameters are other things it returns like which timer was triggered, or what key was pressed etc.
Making a little more sense now?
8 posts
Posted 17 December 2012 - 07:21 PM
this is the basics of what they meant
when you start a timer like this
longTimer = os.startTimer(6) -- 6 seconds
and then it finishes it will trigger a system event which needs to be captured using
event, param = os.pullEvent()
or
event, param = os.pullEventRaw()
where event is "timer", "rednet_message", "key", "char" or a few others and the parameters are other things it returns like which timer was triggered, or what key was pressed etc.
Making a little more sense now?
Seems like I'm a bit over my head here lol.
I've decided just to go for a cosmetic look, that being just a timer (this format: 000:00 [108:00]) on a monitor that counts down and restarts with no user input. Is there anywhere I can find the code for that?
2005 posts
Posted 17 December 2012 - 11:18 PM
I'm positive that someone already wrote a "LOST Countdown Clock" somewhere. Let's see…
Here it is.
1619 posts
Posted 18 December 2012 - 04:36 AM
Umm… What exactly is the problem?
I only know how to make a password door.
Please give more info. Post your current code, and any problems you are having.
I currently have nothing, and am just looking for some way to do it / trying to find out if it's possible. No errors atm.
Look into timers on the wiki, then use coroutines to run the timer and wait for user input.
You love your coroutines don't you. You know that they aren't the solution to everything right?
When you need to check time and get input, they're easier to use then os.pullEvent()