timer?

This is a discussion on timer? within the Game Programming forums, part of the General Programming Boards category; i got a image that i can move around using my keyboard handler keys, but i have a timer set ...

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    12

    timer?

    i got a image that i can move around using my keyboard handler keys, but i have a timer set so that when i hit a button (ex. T) then i should run across the screen with no movement and the keyboard handler should be disabled..... im not sure on how to do this i have had suggestions on using x and y paramaters to control the timer but im too confused... please help!!!

  2. #2
    Unregistered
    Guest
    What?

  3. #3
    Registered User
    Join Date
    Aug 2001
    Posts
    411
    I agree, What?

  4. #4
    bobish
    Guest
    I take it you mean that if you press "T" at the appropriate time then the character will move auto maticly to do that you would just do this:

    if(T is pressed (using what ever input method)&& timer=whatever time
    {
    do_what_ever_happens_if_you_press_the_move key();
    }

    note that depending on what you are exactly trying to do you may want to us while instead of if.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. SIGALRM and timer
    By nkhambal in forum C Programming
    Replies: 1
    Last Post: 06-30-2008, 12:23 AM
  2. tic tac toe crashes :(
    By stien in forum Game Programming
    Replies: 4
    Last Post: 05-13-2007, 06:25 PM
  3. Need help with a count down timer
    By GUIPenguin in forum C# Programming
    Replies: 0
    Last Post: 07-07-2006, 04:18 PM
  4. Timer again.
    By geek@02 in forum Windows Programming
    Replies: 1
    Last Post: 05-04-2005, 10:19 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21