Difference between revisions of ".aimdx"

From WikiManual
Jump to: navigation, search
m
 
(5 intermediate revisions by 4 users not shown)
Line 1: Line 1:
== Rotation Commands: ==
+
{{v221}} 5 [[.aimdx]] rotates the bot clockwise, while 6 [[.aimsx]] rotates counterclockwise.
.aimsx .aimdx
 
  
Overview:
+
==[[Sysvar]]s:==
 +
{{movement}}
 +
 
 +
==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.
 
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.  
 
.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<br>
+
cond
*.eye5 0 =<br>
+
*.eye5 0 =
start<br>
+
start
314 rnd .aimdx store<br>
+
314 rnd .aimdx store
stop<br>
+
stop
  
A DarwinBot using this gene will continuously rotate, a random amount of a quarter 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.
+
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.
  
'''Associated Keywords:''' [[.up]] [[.dn]] [[.sx]] [[.dx]] [[.aim]] [[.refaim]] [[.fixang]] [[.tieang]]
 
  
=== Sysvars ===
+
Also see: [[.aim]] [[.refaim]] [[.fixang]] [[.tieang]]
* [[Definitions]]
 
* [[.up|Movement (.up, .dn. .dx, .sx)]]
 
* [[.aimdx|Basic Turning (.aimdx, .aimsx)]]
 
* [[Shooting]]
 
* [[Reproducing]]
 

Latest revision as of 18: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