Thread: PBasic Probelm
View Single Post
  #4   Spotlight this post!  
Unread 08-04-2004, 09:58
Ryan M. Ryan M. is offline
Programming User
FRC #1317 (Digital Fusion)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Ohio
Posts: 1,508
Ryan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud of
Re: PBasic Probelm

Do something like this: (this is in pseudo-code)
Code:
global variable FirstActivated initialized to 0

Check if first button is press
  If it is, toggle the state of FirstActivation (I.E. if it is 1 then make it 0; if it is 0 then make it 1)

Check if FirstActivated is 1
  If it is, do what ever you want to do here.

Check if Second button is pressed.
  If it is, check if FirstActivated is 0
    If is is, then do your second button action.
__________________