Author Topic: Multi-Eye targeting  (Read 3877 times)

Offline Ta-183

  • Bot Destroyer
  • ***
  • Posts: 105
    • View Profile
Multi-Eye targeting
« on: March 26, 2009, 08:22:34 PM »
I'm kind of miffed about my first bot (still a work in progress) having a very narrow effective sight radius. It uses .eye5 for conspec recognition, shooting, and following friendlies for a short amount of time (seems to be the bot's main feature). But I need to use a gene that will make it turn if it sees food in the other eyes. Eye5 is the only one used so far, and all widths are regular. Any help?

Offline Prsn828

  • Bot Destroyer
  • ***
  • Posts: 139
    • View Profile
Multi-Eye targeting
« Reply #1 on: March 26, 2009, 10:06:49 PM »
Quote from: Ta-183
I'm kind of miffed about my first bot (still a work in progress) having a very narrow effective sight radius. It uses .eye5 for conspec recognition, shooting, and following friendlies for a short amount of time (seems to be the bot's main feature). But I need to use a gene that will make it turn if it sees food in the other eyes. Eye5 is the only one used so far, and all widths are regular. Any help?

Here is some handy code straight from a fresh bot of mine, although it isn't exactly just one gene, lol:

'Focus on target

Code: [Select]
'Eye5
cond
 *.eye5 0 !=
start
 *.refxpos *.refypos angle .setaim store
stop

'Eye4
cond
 *.eye4 0 !=
start
 5 .aimsx store
stop

'Eye6
cond
 *.eye6 0 !=
start
 -5 .aimsx store
stop

'Eye3
cond
 *.eye3 0 !=
start
 15 .aimsx store
stop

'Eye7
cond
 *.eye7 0 !=
start
 -15 .aimsx store
stop

'Eye2
cond
 *.eye2 0 !=
start
 35 .aimsx store
stop

'Eye8
cond
 *.eye8 0 !=
start
 -35 .aimsx store
stop

'Eye1
cond
 *.eye1 0 !=
start
 40 .aimsx store
stop

'Eye9
cond
 *.eye9 0 !=
start
 -40 .aimsx store
stop

That will make it look at anything it sees with any eye by turning until it is in eye5's view.

Actually, I made this bot (The one I got this code from) earlier today, so you are pretty lucky I actually had it on hand
So, what will it be? Will you submit to my will, or must I bend reality to suit my needs?
Better answer before I do BOTH!

Offline Ta-183

  • Bot Destroyer
  • ***
  • Posts: 105
    • View Profile
Multi-Eye targeting
« Reply #2 on: March 26, 2009, 10:09:01 PM »
Thanks! All I have to do now is throw on the conspec and it will be golden.

I hadn't intended on it in the beginning, but the bot is turning out to be a swarmer. I can't wait until I get it perfected.

EDIT: Aww, *^#%!! It isn't capable of ignoring anything that passes conspec. I wanted to ignore anything that passes conspec so if it sees food it attacks it. Great. This is probably going to take some work, but I'm going to try to make it work.

EDIT AGAIN: I did it, and I love what I see. It is now far deadlier than it began. At first, it would have SEVERE issues fighting basicswarmer. Once this system went in, it clobbered it. Ate the alga so fast it couldn't spawn fast enough.
« Last Edit: March 26, 2009, 10:24:54 PM by Ta-183 »