WDTH

WDTH is a CAOS command that returns an object's width in pixels.

Usage
Syntax: WDTH

Returns the object's width in pixels (the width of its current sprite).

Example
WDTH can be used to modify positioning when dealing with agents that have differently-sized sprites. This could be something like correctly positioning a plant being created from a seed, or having different variations of an agent with multiple sprites move at rates proportional to their size.

Example of positioning from the C3 grass: setv va04 wdth subv va04 va02 divv va04 2 setv va05 hght subv va05 va03 subv va00 va04 subv va01 va05
 * va02 is the width of the seed
 * va03 is the height of the seed
 * va00 is the left position (posl) of the seed
 * va01 is the top position (post) of the seed

doif tmvt va00 va01 eq 1 mvto va00 va01 else mvsf va00 va01 endi