.shootval

From WikiManual
Revision as of 08:22, 30 January 2006 by Ollj (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Memory shots

By storing positive numbers in .shoot another bot's memory can be overwritten by what's stored in .shootval. This can be used to either mess up another bot or to exchange some vital information between bots.

Here's how you'd make another bot turn. Light's Icarus used this to dominate F2 league for a while.


cond
'you figure it out
'Icarus fires if:
*.shup -2 !=
start
.aimdx .shoot store
314 .shootval store
stop

This will make any bot that you hit turn 90 degrees to the right.

Advanced Uses of Shootval

As of 2.36, you may 'power up' a shot's strength and range.

Storing a negative value in .shootval will make body shots (-6) and energy shots (-2) have a longer range.

Storing positive values in .shootval will make body shots (-6) and energy shots (-1 and -2) become more powerful.

The multiplier is roughly log2(.shootval). That's log base 2. So spend 4 energy in .shootval and you'll double your shot strength or range, but spend 8 energy and you only triple shot strength or range.

This will also work in a way with venom and waste shots. The increase is linear instead of logarithmic though, and you spend the resource amount instead of energy. See venom and waste. Note that storing negative numbers for venom or waste shots has no effect, the shootval must be positive. (I think)