Like GuiltyRoachKillar said, check the ED, it's an essential place for information for us mission editors.
Here's a link to a description.ext tutorial:
http://www.ofpec.com/editors/resource_view.php?id=18And here is a quick copy/paste from one of my missions:
class CfgIdentities
{
class myers
{
name = "James Myers";
face = "face41";
glasses = "none";
speaker = "John";
pitch = 1.00;
};
};
Put that in the descripion.ext file. Remember to have the filetype as all when you save it in notepad, or you'll get description.ext.txt
Then either in the init.sqs or in a units activation field put:
unitName setidentity "myers"
That should do it.
As for the second question, yes it can be done. Scripting is the best way to do it and I suggest you head over to the ED. I made a quick search for GuiltyRoachKillar's script and found it. Here's the link:
http://www.ofpec.com/editors/resource_view.php?id=688