Physical structure
The howitzer object contains the following prims:
A root prim, such that when at <0, 0, 0> rotation the howitzer itself is horizontal and parallel to the ground, with the barrel of the gun pointing towards the negative side of the Y axis
The main section of the gun (carriage, wheels, etc)
The gun barrel prim, which when elevated pivots on the X axis
Control prims with the following names:
"Forward button"
"Back button"
"Up button"
"Down button"
"Fire button"
"Auto button"
"Angle control" (ideally a flat, hollow cylinder)
Inside the root prim's contents should be:
A sound file for the howitzer report (firing)
An shell object
The shell object should be a sphere containing (names unimportant):
The Howitzer Shell script
A sound file for the shell explosion
A particle texture for trailing smoke
An "explosion" prim
The explosion prim should be a tiny invisible phantom object, containing:
The Explosion script
A particle texture for the explosion
Using the howitzer
The whole gun may be moved forward or back and rotated (traversed) by using the appropriate buttons. In addition, the barrel prim can be rotated up and down (elevated) using the up and down buttons. The fire button fires a shell.
On firing a shell, the gun moves back a short distance and rotates slightly to simulate the effects of recoil. The fire button turns yellow and is disabled for a short time to simulate reloading, and then turns green again when the gun is ready to fire.
The elevation of the gun is limited - at the lower end, the barrel cannot go any lower than roughly parallel to the ground, and at the upper end, the elevation is limited to prevent the breech of the gun from being buried in the ground.