Bots and Simulations > DNA - General
Would this work?
(1/1)
kage:
Could I use this if I wanted my bot to shoot nrg towards fellow bots when it was full of nrg anyways, to serve as a kind of medic?
--- Code: ---' Medic Gene
cond
*.eye5 0 =
*.nrg 32000 >
*.refeye *.myeye = or
start
-2 .shoot store
*.refvelup .up store
stop
--- End code ---
abyaly:
This gene would execute
If [(eye5 > 0) && [(nrg > 32000) || (refeye = myeye)]]
So the *.nrg 32000 > part will always be false since you cant have more than 32000 energy.
But the gene would still execute every time the bot sees a conspec, reguardless of how much energy it has.
kage:
So then maybe set it down to like 25000?
Numsgil:
Probably, though the conditions are still odd. The way it works now, the bot would fire nrg out only after[/ the conspec it saw is no longer visible.
I would change it to something like:
' Medic Gene
cond
*.eye5 0 >
*.refeye *.myeye =
*.nrg 25000 >
start
-2 .shoot store
*.refvelup .up store
stop
Light:
maybe add in *.refnrg 1000 < to only shoot at bots that are low on energy
Navigation
[0] Message Index
Go to full version