Difference between revisions of ".hit"

From WikiManual
Jump to: navigation, search
 
(4 intermediate revisions by 3 users not shown)
Line 3: Line 3:
 
A good use of these are with Blind bots to give them some sense of what is going on around them.
 
A good use of these are with Blind bots to give them some sense of what is going on around them.
  
hit - Has your bot been hit by another bot?
+
.hit - Has your bot been hit by another bot?
 
   
 
   
hitup - hit from the front?
+
.hitup - hit from the front?
hitdn - hit from the back?
+
 
hitdx - hit on the right?
+
.hitdn - hit from the back?
hitsx - hit on the left?
+
 
 +
.hitdx - hit on the right?
 +
 
 +
.hitsx - hit on the left?
 +
 
 +
'''Please do not confuse the sysvars above with the sysvars below.''' ("Hit" does not mean hit with shot, it means hit by a physical robot. For shot look below.)
 +
 
 +
{{shot}}
  
 
== Note from the C++ front lines ==
 
== Note from the C++ front lines ==

Latest revision as of 12:12, 21 December 2016

These give the bots a sense of touch, allowing them to tell when something has hit them or if they have hit something.

A good use of these are with Blind bots to give them some sense of what is going on around them.

.hit - Has your bot been hit by another bot?

.hitup - hit from the front?

.hitdn - hit from the back?

.hitdx - hit on the right?

.hitsx - hit on the left?

Please do not confuse the sysvars above with the sysvars below. ("Hit" does not mean hit with shot, it means hit by a physical robot. For shot look below.)

Shot:

.shflav 202
.shang 209 .shup 210
.shsx 213 Veggietransparent.gif .shdx 212
.shdn 211

Note from the C++ front lines

In the 2.4 C++ port (probably will be called 2.5 I think) hitup, hitdn, hitsx, and hitdx will probably be replaced by hitang, which will return the angle of the hit relative to the eye.

The reasons are two fold: hitang would be more useful in practice, and free up 3 other sysvars (making the sysvars file less cluttered).