Darwinbots Forum
Welcome To Darwinbots => Newbie => Topic started by: multibotlover on January 29, 2009, 11:46:16 AM
-
today I am very frustrated. I am working on a basic veggie robot in DB but cant get the stupid .repro gene to work!
cond
*nrg 3000
start
50.repro
store
stop
end
can anyone help me?
-
cond
*nrg 3000 >
start
50space.repro
store
stop
end
-
Don't forget the punktuation aswell
cond
*.nrg 3000 >
start
-
ahaha, I missed that one
-
ok its working now and ive added another gene. its supposed to make the veggie fire -3 shots at anything it sees, but just fires continually even if nothing is there. this is not a very important glitch as its doing its job, but it is inefficient.
cond
*.eye5 =!
start
-3 .shoot store
stop
notice any errors?
-
cond
*.eye5 =!
start
-3 .shoot store
stop
You are not actually comparing eye5 to anything. Should be:
cond
*.eye5 0 =!
start
-3 .shoot store
stop
-
ok, because when I made the gene it looked wrong somehow. thanks
-
I'm a bit out of practice, but does that make a difference? And shouldn't that be '!=' ?
-
If the stack is empty, it'll pop 0s. So it might make a difference or it might now. And it should be !=