From WikiManual
Jump to: navigation, search

V221.gif 5 .aimdx rotates the bot clockwise, while 6 .aimsx rotates counterclockwise.



.aimsx 6 .aimdx 5
.up 1
.sx 3 Veggietransparent.gif .dx 4
.dn 2
.aim 18 .setaim 19
.maxvel 11
.setboy 314 .rdboy 315

Forwards compatibility note:

aimdx is the old name for aimright

aimsx is the old name for aimleft


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.

*.eye5 0 =
314 rnd .aimdx store

A DarwinBot using this gene will continuously rotate, a random amount of a quarter rotation(90 degrees), 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.

Costs: There is no direct cost involved with a DarwinBot rotating. There is only the indirect cost of actually using �store �. This is set from within the options window. Its default value is 1 unit of energy.

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.

Also see: .aim .refaim .fixang .tieang