View Single Post
  #4   Spotlight this post!  
Unread 26-01-2003, 10:45
Unsung FIRST Hero
Nate Smith Nate Smith is offline
FRC Key Volunteer Trainer
AKA: CrazyNate
no team
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Old Town, Maine
Posts: 1,029
Nate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to beholdNate Smith is a splendid one to behold
Send a message via AIM to Nate Smith Send a message via Yahoo to Nate Smith
Here's a bit of code which will do what you want:
Code:
'in variable declaration section
seq1_flag VAR bit

'in main loop

'Check 2nd condition first to allow for continuous action, and not just one loop
if p2_sw_top = 1 AND seq1_flag = 1 then run_seq1

'Check first condition
if p1_sw_top = 0 then skip_seq1

'if we got here, condition 1 is true, set flag
seq1_flag = 1
'jump out of sequence loop
goto seq1_done

skip_seq1:
'first condition is not met, clear flag
seq1_flag = 0
'jump out of sequence loop
goto seq1_done

run_seq1:
'both conditions met, set value
p1_y = 200

seq1_done:
'end of sequence loop
__________________
Nate Smith
nsmith@smythsoft.com
12 seasons, 4 teams, and more time logged behind the scorekeeper's table than I care to remember...
returning for 2011? only time will tell...