to go
waituntil [switcha = 1]
motor commands
waituntil [switcha = 1]
more motor commands
endmotor commands
waituntil [switcha = 1]
more motor commands
;another way, one switch
to go
if switcha = 1
[motor commands]
if switcha = 0
[more motor commands]
end[motor commands]
if switcha = 0
[more motor commands]
;another way, one switch
to go
ifelse switcha = 1
[motor commands]
[more motor commands]
end[motor commands]
[more motor commands]
;two switches!
to go
if switcha = 1
[motor commands]
if switchb = 1
[more motor commands]
end
[motor commands]
if switchb = 1
[more motor commands]
No comments:
Post a Comment