Re: A86: Reading keypresses


[Prev][Next][Index][Thread]

Re: A86: Reading keypresses




I tried that, but then it is updated every frame.  I want to have to
re-press it everytime to fire.  Do I need to save it's state?

psuedo code:
if ((fired == FALSE) && (second_pressed == TRUE))
{
  fire
  fired = TRUE
}
if (second_pressed == FALSE)
  fired = FALSE
  

At 12:22 AM 5/12/98 -0400, you wrote:
>
>Read 2nd using the port
>
>David Phillips wrote:
>
>> I'm having trouble getting keys read correctly in a space invaders game I'm
>> making.  I read the arrow keys in (currently using ports) and also need 2nd
>> for fire and others like exit.  I want the fire key to have to be pressed
>> for every shot but the arrows to be held.  Calling getkey to check 2nd
>> works, but you must let up and re-press left/right.  I read some other
>> source, but can't find anything exactly like this.  Any ideas?
>>
>> // David Phillips
>> // mailto: electrum@tfs.net
>> // AIM: electrum32
>
>
>
>


// David Phillips
// mailto:electrum@tfs.net
// AIM: electrum32


Follow-Ups: References: