Difference between revisions of ".sun"
From WikiManual
m (my floating veggy has found a use :) sun's example) |
|||
Line 1: | Line 1: | ||
− | .sun ----- Sun | + | .sun ----- Sun returns a 1 if the robot is facing within 20 degrees of upwards. |
Latest revision as of 11:25, 27 June 2014
.sun ----- Sun returns a 1 if the robot is facing within 20 degrees of upwards.
found it in a Floating Veggie, perhaps Endy made it?
He did.
.sun is in gene 3.
Don't 'fix' these veggies and they tend to migrate
to the upper left corner of the field.
' Floating Veggies cond *.robage 0 = start 960 1 rnd mult 1 rnd mult inc stop cond *960 0 = *.nrg 5000 > start 15 rnd .aimdx store 50 .repro store stop cond *960 1 = start 15 rnd .aimdx *.sun 1 sub -1 mult mult store *.maxvel *.vel sub .up *.sun mult *.edge sub store .repro inc stop end
These veggies use the refvar sun to identify the top of the screen. The floating members of their species(phenotypes are falling and rising types, decided at birth) stop spinning and accelerate once they locate it.