View Single Post
Old 05-11-2008, 08:27 PM   #34 (permalink)
LedZepp
Experienced Member
 
LedZepp's Avatar
 
Join Date: Mar 2007
Posts: 976
LedZepp has a spectacular aura aboutLedZepp has a spectacular aura about
Default

Quote:
Originally Posted by Nurta View Post
the lag is actually programmed in, since at first you'd hit right and it would go right 5 times even if you do it fast. I'll play with the numbers some
Theres an easy way to have it only do the button action once.

Declare a boolean and set it to false
Code:
bool i = false;
then when you have this code
Code:
if (GamePad.GetState(PlayerIndex.One).DPad.**** == buttonState.Pressed)
change it to
Code:
if (!i && GamePad.GetState(PlayerIndex.One).DPad.**** == buttonState.Pressed)
Then in the same block of code add
Code:
i = true;
and lastly make another block of code for
Code:
if (GamePad.GetState(PlayerIndex.One).DPad.**** == buttonState.Released)
and add this in that block of code
Code:
i = false;




LedZepp is offline   Reply With Quote