The Autoselect message is sent when one of four events occurs. The chart below lists the events and corresponding senderrefs. Autoselect must return a value to whatever called it. If the player is mounting the weapon or SelectWeapon() has been used, autoselect only needs to return a value greater than -1. But if it's a powerup or misc cog, there's a good chance that all weapons are being queried and the one with the highest returned value will be selected. The Weapon Section's notes includes a chart of the default autoselect return values.
|Sender:||See the chart below.|
|Source:||The player whose weapon is being queried.|
|Sender Type:||System (1).|
|Source Type:||Thing (3).|
|0||Next / Prev Weapon keys queried the weapon. Also used when a cog queries for the weapon's priority.|
|1||A miscellanious cog has queried for the best weapon.|
|2||A powerup cog has queried for the best weapon.|