Thanks HR, I'll try that tonight.
I already have a very rough test version running - at the moment I'm pissing around with all the things I can do with this EH.
One test simply camcreated a flag pole ("FlagCarrier") at the bullets final rest point. It was interesting to note that even with no delay step between the getPos updates there was about a 5m gap between the bullet's final resting point and the creation point of the object. OFP must run script steps slower than it runs bullet updates !
The second test created a Shell73 instead - that turned my MG into a fully automatic rocket launcher ! The neat thing was that due to the script lag and depending upon the loop delay setting if the bullet hadn't gone at least 10m or so then it wouldn't blow up (ie no bulletPos so no shell creation !).
Another test stopped the bullet in mid air with a getpos / setpos routine. I couldn't actually see the bullet so to see where it was I tried creating various other things at that point. In the end I created a Shell73 in each step of the loop - I found that if I fired near straight up then all of the shells would hit each other and make a beautiful cascade of fireworks. Again, due to some lag effect the cascade would end and the last shell would drop out and land next to me ! Oh well ! :beat:
What I'm working on now is getting all of the units within (say) 20m of that final point, then having them do something so that I know that they were "affected". I was thinking about one of setdammage 1, play a clearly ndentifiable animation or camcreate a flagpole over their head. I like the flagpole idea - I use it a lot when testing my scripts - nothing beats a 30 foot pole floating 10m over your head pointing out exactly where you are !
I've set up a trigger with activation Any Present, I am now in the process of looking up my refs to find out how to get the array of all current members satisfying that trigger. If anybody wants to save me a half an hour of searching that would be great !
I've also tested various "nth" tests and am sort of settling on every 15-20 rounds creating the effect. It means that rifle firefights usually produce the effect about once or twice per clip, while an MG can create it with one long burst. Snipers of course can't really do it unless they go wild with their fire.
More news as I make it. And FWIW, I've attached the "pre, pre-alpha" version of the script to this post (the cascade of shells version !)
:gunman: :tomato:
Cheers !
roni
EDIT - Fixed annoying typos . . .