Discussion Forums at Tactical Neuronics


Re: Anybody willing to help? From:
The same nerd

I've moved onto the gathering of flags part of the bug, and I'm having some problems. Does anyone see what's wrong with this? My bug scans, finds a flag, and still picks it up even though he's at zero damage. I just can't figure out what's wrong with it. Thanks!

getflag:

if damage = 0 then
scan relative 1
if scan found flag then discharge energy
scan relative 3
if scan found flag then discharge energy
scan relative 5
if scan found flag then discharge energy
scan relative 7
if scan found flag then discharge energy

end if


if damage <> 0 then


scan position 1
if scan found flag then
move forward
end if


scan position 3
if scan found flag then
turn right
move forward
end if


scan position 5
if scan found flag then
turn right
turn right
move forward
end if


scan position 7
if scan found flag then
turn left
move forward
end if
end if


return

This message is a Reply to: Anybody willing to help? from 3 Computer Nerds

Replies to this message:


© 2001, John A. Reder.