   Using keyboard
  This may be a bit confusing but I'll do my best to describe it:I have a small simulation of a river that I have made.When I run the program I have bits of wood appearing at the top of the river moving down stream to the bottom and off the screen.This is almost what I want.I want the wood to appear when I press the space bar and then start moving when I release, first of all is this possible?Second, if I press space bar again I want them to disappear, and then when it is pressed again appear back at the start.And finally if I allow the wood to flow all the way down river I want the wood to appear back at the top the next time I press the space bar.I’m sure none of this is that difficult and that getting the simulation to run in the first place was the hard bit but I am still relatively knew to OpenGL and any help you guys can give me would be greatly appreciated.What I did manage was to get it to draw the wood when the space bar is pressed but the movement calculations had been running so it drew the wood where it would have been if it ran from the start. But then after drawing it, it would remain stationary until I pressed space bar again and then it would draw it where it would have been and so on. If you see what I’m saying.Thanks   
  Just code up a simple little state machine:State Start    If space bar is pressed, create woodlings in appropriate position    Transition to State RunningState Running    If Spacebar is pressed, delete woodling objects.    Transition to State Start    If woodlings reach end, delete woodling objects.    Transition to State StartBasically just new your objects to create them, and delete your objects to destroy them.  Alternately have each woodling object have a m_drawMe member var, and a method that resets their position.-me   ;  Thanks for the idea, I'll have ago at the state machine;  Right well I've given that a go and seem to be failing, I can't seem to find anything on the net either about state machines.Could you help me out with more code like pseudo code?Thanks   