"basicplant" is the name of the image file which is situated in the images folder. So, this agent uses the image 'basicplant.c16'. (Although, if no c16 is found, an s16 of the same name will be loaded).

3 is the number of images the plant can use.

0 is the image number to start counting these from (So, 2 3 would give the plant 2 images, 3 and 4).

perm is the permeability of the object. It goes from 0 to 100, 0 meaning that it can go through anything, and 100 meaning it can't go through anything. In this case, it can go through some types of floor and wall, but mostly can't.

emit is the smell an object emits. Creatures navigate using smells, so its important that objects emit them. In this case, it's emitting carbohydrate smell.

fric is the friction of an object as a percentage of velocity while moving along the ground lost per tick.

'wait' tells that between each sprite changing, the script will wait a bit - else, the animation will be too quick.

The command 'alph' will set the transparency of an agent - 'alph integer yes/no' is the syntax of the command. (Note that this is a DS only command, and slow.)

'kill ownr' means that the owner of the script will be killed - here, the owner is the plant.

endm

In some agents, there might be a more complex route to take than the one we've chosen here of 'turn off the timer, grow, live, seed and die', but for this one, we're done. The endm marks the end of the timer script, as opposed to retn above, which closes off a subroutine.