Alexander Laemmle: The Hitchhiker's Guide To Albia
Simple Install only COBs
A COB can use Scripts, but it does not have to. There are two types, one installes a new object (the scripts were installed earlyer - you'll find an example in 'All cheese'), the other one does some changes to an object or creature. Let's do some examples for this kind of COBs (I once called them infusion COBs... no I like to call them 'Install only COBs).
1) A low amount of starch
Let's make a COB that adds 50 moles of starch to the active (selected) Norn.
inst
stim writ norn 10 255 0 0 57 50 0 0 0 0 0 0
endm
stim writ norn 10 255 0 0 57 50 0 0 0 0 0 0 | send a chemical msg directly to the target (norn = active norn). 10 255 0 0 = input for the target's nudge significance neurone (the 255 disables the input - so it's not essencial for this example) 57 50 0 0 0 0 0 0 = add 50 moles of chemical 57 to target (you could use 4 chemicals but the last three aren't used in this example. |
To use this for all Norns in the game we could change it to:
inst
enum 4 1 0
stim writ targ 10 255 0 0 57 50 0 0 0 0 0 0
next
endm
enum 4 1 0 ... next | Do everything between enum and next for all objects 4 1 x (all norns). Enum sets the target value automaticaly. |
Now all norns in the game would get 50 moles of starch.
Now let us add 40 moles glucose and 30 moles glycogen input to our COB:
inst
enum 4 1 0
stim writ targ 10 255 0 0 57 50 58 40 59 30 0 0
next
endm
A nice one, isn't it?