PDA

View Full Version : logic help!



wolfy_616
10-05-2012, 08:41 PM
i used to be good at doing my own logic with occasional help from friends but its been a while since i created anything and im a little stuck...hopefully you can help me.

first off ill quickly explain so you can better understand...

im creating a halloween special mini game...once the player gains 1000 points they will gain access to a circular saw that comes down from above which can be used as many times as you like in 30 second intervals. all the logic for the saw mechanism is done and on a sequencer. the plan is that once the player gains 1000 points a green light button will come on to signal the machine is ready. you touch the button to activate it. when the saw is done the light goes red and you have to wait 30 seconds to use it again. and of course once its ready the light goes green again. HOW DO I DO THIS??

if you need me to explain a bit more just let me know :-) im hoping its something simple.

Taffey
10-05-2012, 09:36 PM
I'm sure there are better and more elegant ways to do it, but my first inclination would be to use a timer (with no input) set to 30 seconds. Wire that into an 'and' switch with whatever other logic you have going to activate the saw. What this accomplishes is that the saw will only operate once activated (by score) AND when the timer is full.

Now, take the saw activation button and wire that into the reset input of the timer. Once the saw is used once, the timer is reset and starts counting up to 30 seconds again. It will remain off until it reaches 30 seconds, at which point it will be on again, re-enabling the 'and' switch and allowing it to be used again.

So that's the operation part done. As for the red/green light, wire the timer output into your light and set the on/off colors of the light accordingly. Done!

wolfy_616
10-06-2012, 12:55 PM
thanx man. it didn't work exactly but you gave me the building blocks to make it work. it works just as i wanted it to now.