Shooting

From WikiManual
Revision as of 07:24, 30 January 2006 by Ollj (talk | contribs)
Jump to: navigation, search

The .shoot command is one of the most vital in DB. With it a bot can feed, dispose of waste, shoot poison or venom, and affect another bots memory.

Sysvars:

Shooting:

.shoot 7 .shootval 8
.kills 220
.backshot 900 .aimshoot 901

Basics

Whenever a non zero value is stored in .shoot, a shot is produced. This shot by default fires directly along the bot's eye's vector (that is, which direction it's looking). The shot's basic strength and range are determined by a bot's body.

Shot Types:

.shoot ----- Makes me shoot a particle from my front end(usually).

.shootval ----- Defines the value of the particle shot with the shoot command.

.backshot ----- Any non zero value here makes me shoot backwards instead of forward. Neat huh?

Syntax. (50 .shoot store) will store a value of 50 in my memory location 7 (.shoot) The value stored in .shoot defines the memory location in which it will strike its target. The value stored in .shootval will be transferred into that memory location when the shot hits another robot A number of specific negative numbers can be used with .shoot.

-1 Forces the target robot to fire a -2 (containing some of his energy) shot back toward the first robot A -1 shot does not require a value to be stored in .shootval.

-2 Fires a shot containing some of the robot's energy.

-3 Fires a venom shot.

-4 Fires a shot containing some of the robot's waste.

-5 Poison shot. Cannot be fired voluntarily, only in response to an incoming -1 shot.

-6 As -1 but specifically targets body points rather than energy points.

*.shflav - Returns the flavor of a shot that hits you. That is the value stored into .shoot to fire it.
*.shang - Returns the angle that the shot hit you relative to the absolute angle you are facing. So if a shot hits you from directly behind, *.shang will return 628
*.shup - returns a value when hit from the front
*.shdn - returns a value when hit from behind
*.shdx - returns a value when hit from the right
*.shsx - returns a value when hit from the left



Defenses and Attacking

For 2.36 and later, check out How defenses and attacks work