Yes, it can be done. If you look in the editor depot you can find a sample mission and script file called "ak_moves". Basically this demo mission shows all the animated moves you can make a unit do. And if you play the mission you can watch the guys go through all the motions you command. The readme text with the demo list sall the "playmove" and "switchmove" types. As far as making a surrender action you could do something like this with a script:
in the init feild of the player, or in a trigger that is activated, say when the palyer has no more ammo you could put:
sur = player addaction ["surrender","surrender.sqs]
Then you could make the "surrender.sqs" script somthing like:
player setCaptive true
remove action sur
exit
Lots of this stuff can be found in the OFP tutorials and in other forum threads, so you should search those. It is best to search those before posting a question, so that you do not post something that has already been asked many times. Read the introduction to scripting tutorial at the editor depot.
Kind Regards and welcome to the wonderful world of scripting (you can do things with scripting that you could never to with the editor alone.)