Darwinbots Forum
Bots and Simulations => DNA - General => Topic started by: Havvy on July 02, 2007, 05:44:54 AM
-
cond
*.nrg 1000 <
*.body 50 >
or
start
How would this DNA event work?
Also, if directly following a 'else' there is a 'cond', will it work like an elseif?
-
cond
*.nrg 1000 <
*.body 50 >
or
start
If one of this two is true, the gene is activated(the commands after start are being executed). This is standing somewhere in the wiki too, it's handy if you look there . There you can find interesing things.
Also, if directly following a 'else' there is a 'cond', will it work like an elseif?
I am not sure, I tried it once but then I could'nt do it, maybe I was just doing it wrong .
You mean something like this I gues
cond
*.nrg 1000 <
*.body 50 >
or
start
else (the else part I gues you mean)
cond
start
else
stop
stop
-
else gets activated whenever start doesn't. The most straightforward example would be something like this:
cond
*.nrg 5000 >
start
50 .repro store
else
0 .repro store
stop
This basically acts as an if-else block.