Bots and Simulations > DNA - General

help....again

<< < (11/12) > >>

Numsgil:
Move towards it yes.  But he could be way at (a billion, a billion) and so 50 .up might not be enough.

I'd do something like:

cond
0 0 dist 200 >
start
0 0 angle .setaim store
10 .up store
stop

feel free to change 200 with whatever other sort of radius you want to use.  Remember that most bots have a radius of like 60, so the closest a bot can ever really get to 0,0 would be like (60,60).

MrMound:
all right thaks guys hopfully this will make my bot work better

Numsgil:
A more energy efficient method might be:

cond
0 0 dist 200 >
start
0 0 angle .setaim store
10 .velup sub 0 floor .up store
stop

Botsareus:
Thats only if you run it in 2.4

for others try


--- Quote ---cond
start
0 0 angle .setaim store
0 0 dist N div .up store
stop
end
--- End quote ---

If you know a good number for "N" now..., it problebly won't work anyway. I have no idea how to make a robot not over shoot its target location.

Numsgil:
Actually that gene would work in anything post 2.36 I beleive.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version