please check the download, wiki and tutorial (aum) sections. there are a few scripts already available for this afaik.
i think they might fit your needs perfect.

cheers


Models, Textures and Levels at:
http://www.blattsalat.com/
portfolio:
http://showcase.blattsalat.com/