The 'orange shot' can refer to one of two things; the first is the Enemy Shooter in Keen 3; this is an invisible metasprite that produces orange shots at regular intervals. This has its own page as most of the patches relating to it relate directly to the shots it produces.
The second, and the one covered on this page, is the Enemy shot in Keen 2 that is produced by both Guard Robots and Vorticon Elites. This is independent of them and so patches affecting it will affect both the sprites that produce it. Shots will be destroyed if they travel offscreen, hit solid tiles or hit enemies. If they are patched to not do this they can quickly overwhelm the game's ability to track them all, resulting in a crash.
Orange shots use sprite type 11 which means they kill both Keen and some enemies.
|Patch: Keen 2|
The orange shot has only one behavior, to move across the screen until it hits something. This behavior is also used by Keen's shot. Its collision deals with all the things that can make it turn into a zap\zot (And those sprites which it won't affect.)
Behaviors: $7567W Shot behavior $775FW Shot collision
|Patch: When spawned|
Shot behavior code
The orange shot's behavior is quite simple,but also shared by Keen's shot; so altering it can have unintended side-effects. On the first line it runs a tile check code, if the shot has hit any kind of solid tile it runs the rest of the code, otherwise it does nothing.
On being destroyed first sound $25 is played, then the sprite's type changes to $0C, a 'harmless' type used for zap\zots. Its behavior is set to that of the zap\zot, $7547W and its animation timer to zero. (This is to help time how long the zap\zot stays visible before vanishing.) Finally a random number is called; if it is larger than $80 (50%) then a zap sprite is used, otherwise a zot is.
|Patch: Shot behavior code|
The default speed of shots is +-350. This never changes until they are destroyed. This is in fact set when the Robot and Elite call the shooting code, so both can have shots moving at different speeds.
|Patch: Shot speeds|
The orange shots have their own specific collision which controls what sprites cause them to be destroyed on contact.
Shot collision code
This is the orange shot's complete collision code. It is basically a simple check for what sprite types don't destroy the shot on contact. These are checked for in the first two lines and are types $06, $0D and $04. In order these are the Guard Robot, zap\zot and Vorticon Elite. Two of these sprites produce shots, so cannot be shot by their own projectiles, while the third prevents shots being destroyed by other destroyed shots.
When destroyed sound $25 is played and the shot's behavior set to that of a zap\zot ($7547W) and its collision to 'nothing' ($61A2W.) Finally a random number is called; if it is larger than $80 (50%) then a zap sprite is used, otherwise a zot is.
|Patch: Shot collision code|
The shot has only one animation, though the zap\zots it produces have many.
|Patch: Orange shot animation|