Discussion Forums at Tactical Neuronics


Need my bug fixed. From:
Ming

This is my bug:
______________________________________

name First Try
author Ming
iff code we are the enemy

raise shield

scan:
scan relative 1
if scan found mine then turn right then turn right then goto scan
if scan found flag then go backward then discharge energy then go foward then go foward then goto scan
if scan found barrier then turn left then goto scan
scan perimeter
if found enemy then discharge energy then goto move
scan forward
if scan found flag then goto foundflag
if scan found enemy then goto attack
scan backward
if scan found flag then turn right then turn right then goto foundflag
if scan found enemy then turn right then turn right then goto attack
scan right
if scan found flag then turn right then goto foundflag
if scan found enemy then turn right then goto attack
scan left
if scan found flag then goto foundflag
if scan found enemy goto attack

move:
generate random
if random is 1 then turn right then goto scan
if random is 2 then go foward then goto scan
if random is 3 then go foward then goto scan
if random is 4 turn left then goto scan

attack:
lower shield then fire weapon then raise shield then goto scan

flagfound:
if damage is 0 then discharge energy

flag2:
scan forward
if scan found flag then go forward then goto flag2
goto move

______________________

Can someone please fix it. It keeps on scanning. Thanks.

Replies to this message:


© 2001, John A. Reder.