.aimdx

From WikiManual
Revision as of 11:07, 25 December 2005 by Griz (talk | contribs)
Jump to: navigation, search

Rotation Commands:

.aimsx .aimdx

Overview: These commands change the orientation angle of the DarwinBot. When a value is stored into either of these memory locations, the DarwinBot rotates on his own axis through an angle proportional to the input value. .aimsx rotates the DarwinBot anti-clockwise while .aimdx rotates the DarwinBot clockwise. One full rotation is equal to 1256 units in either direction. One half rotation is equal to 628 units in either direction. One quarter turn is equal to 314 units.

Cond

  • .eye5 0 =

start
314 rnd .aimdx store
stop

A DarwinBot using this gene will continuously rotate, a random amount of a half rotation, clockwise as long as he never sees anything in front of him. As soon as he does see something right in front of him, he will cease to rotate.


Activation hierarchy: The rotate commands are among the first things done during each cycle. They are carried out before movement, ties and shots. You need to be aware of this while programming a robot. If it should turn and fire in the same cycle, it will probably miss its target.

Associated Keywords: .up .dn .sx .dx .aim .refaim .fixang .tieang

Sysvars