Difference between revisions of ".aimdx"

From WikiManual
Jump to: navigation, search
m (Reverted edit of CjwL0r, changed back to last version by Ollj)
 
Line 1: Line 1:
{{v221}} 5 [[.aimdx]] rotares clockwise [[.aimsx]] rotates counterclockwise.
+
{{v221}} 5 [[.aimdx]] rotates the bot clockwise, while 6 [[.aimsx]] rotates counterclockwise.
  
 
==[[Sysvar]]s:==
 
==[[Sysvar]]s:==
Line 16: Line 16:
 
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.
 
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 . This is set from within the options window. Its default value is 1 unit of energy.
+
'''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.
 
'''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.

Latest revision as of 17:52, 13 February 2014

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

Sysvars:

Movement:

.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

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 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