Darwinbots Forum
Bots and Simulations => DNA - General => Topic started by: kage on April 14, 2007, 10:16:47 PM
-
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?
' Medic Gene
cond
*.eye5 0 =
*.nrg 32000 >
*.refeye *.myeye = or
start
-2 .shoot store
*.refvelup .up store
stop
-
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.
-
So then maybe set it down to like 25000?
-
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
-
maybe add in *.refnrg 1000 < to only shoot at bots that are low on energy