Actually Dinger and I have been working on this problem and have done an end around on the entire drop/setpos/foreach bit.
Digger came up with teh notion of attaching a shell to the missile simulation. It works out exceptionally well.
Simply camcrate the 'shrapnel' addon, setdir, and off it goes without the usual drop. It's a pity the shotbullet simulation doesn't work in the same fashion.
With this setup, we're able to spawn a spread of 120-200 bits of shrapnel inside .2 seconds. This is without reliance upon setpos, foreach, or any global variables.
About the only down side is, shotmissile ends the simulation with a small explosion at the impact point. It probably won't bother most people, but bothers me a bit.
I can't speak for Dinger, but think he feels the same as me. Whatever solutions that can be found have to try as they may to avoid:
1) Long executon times. As the shrapnel based scripts will more often than not, be called 2 or 3 times all at once (or in the case or artillery deployed mines, a dozen times). Locking folks machines up for 3 seconds while shrapnel is spawned just isn't going to fly (and will pose real problems in MP).
2) It has to be easy to use. Dependence on a raft of global variables or a complex set of triggers isn't all that great. The working claymore and bouncing betty scripts I've worked up are exceedingly easy to call with , [this] exec "fireclaymore.sqs" where this is the name of a gamelogic object who's facing is the direction the claymore is to detonate.
3) And this is the kicer, the shrapnel sim has to take into account lateral travel of the shrapnel over the battlefield. I was using Drop in the early versoin of the claymore, but the problem was I had to simulate each projectile one at a time because the drop command's timerevent only passes x,y,z in. If it were to pass the boundobject parameter as well, then this would have been the wya to go, as you could track the flight of all the objects and constantly check for cohabitation of shrapnel in the same space as other objects (aka hit detection). Without proper hit detection, the simulation just doesn't hold true. If a tree is in the way, the simulation needs to give the target cover. Something my early tests showed would be expensive and wordy to accomplish.
If you'd like to confabulate on this, pop in on #ofpec. I'm usually there and will gladly swap ideas/scripts.
Joel