Venom

From WikiManual
Revision as of 17:59, 9 February 2006 by Elite (talk | contribs) (Neatned up + moved some info)
Jump to: navigation, search

Venom is can be stored by bots using .strvenom and fired by storing -3 in .shoot. When venom hits another bot the memory location specified in .vloc of the bot that fired the poison will be overwriten by the value in .venval, for a length of time equivelent to the amount of poison fired (the value in .shootval)

Venom is similar to poison, but unlike poison can set a memory location to a specific value rather than simply zeroing it.

cond
*.robage 0 =
start
.venval inc
.backshot .vloc store
stop
cond
100 *.venom >
start
100 *.venom sub .strvenom store
stop
cond
*.refeye *.myeye !=
*.refeye 0 >
*.eye5 30 >
start
'fire venom
-3 .shoot store
stop

Here's a basic example showing a bot storing venom whenever it falls below 100. At birth it'll store 1 in venval and .backshot in vloc; to save energy on costs. These will not change unless changed by another. By storing the -3 in .shoot it fires a venom shot causing the defending by to begin firing backwards for however long the hundred units of venom last.

With some additional coding it could then feed from an enemy once it knows a venom shot has been fired.

Related pages

Poison and Venom