Bots and Simulations > DNA - General
The OR Command
(1/1)
Havvy:
--- Code: ---cond
*.nrg 1000 <
*.body 50 >
or
start
--- End code ---
How would this DNA event work?
Also, if directly following a 'else' there is a 'cond', will it work like an elseif?
Peter:
--- Quote ---cond
*.nrg 1000 <
*.body 50 >
or
start
--- End quote ---
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.
--- Quote ---Also, if directly following a 'else' there is a 'cond', will it work like an elseif?
--- End quote ---
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
--- Quote ---cond
*.nrg 1000 <
*.body 50 >
or
start
else (the else part I gues you mean)
cond
start
else
stop
stop
--- End quote ---
Numsgil:
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.
Navigation
[0] Message Index
Go to full version