Well, I was envisioning placing a gamelogic somewhere quite far from the arty piece... and have it move with the barrel.
For instance.... wherever the muzzle of the arty piece is looking, there will be a game logic say, 1000 meters out.
As the muzzle raises or lowers in elevation, then the gamelogic's height above the arty's height will be adjusted. In essence, you will have a gamelogic 1km away, at any angle, and at varying heights.
We can get the angle the muzzle is elevated by doing something like:
_artyHeightASL = (getPosASL _arty) select 2;
_angle = (((getPosASL gameLogic) select 2) - (_artyHeightASL)) / 1000;
_elevation = atan _angle;
BUT, the problems I'm having are
1) even getting the direction the arty's muzzle is pointing... a 'direction' or 'getDir' command only returns the bearing that the entire arty piece is facing (i.e. where you placed it originally facing...) I tried to get the direction of the gunner, but that just returns the same bogus bearing no matter which way you're facing, 258.something degrees.
2) I'm not sure how to "attach" a gameLogic to the end of the muzzle, and then setPos is 1km away.
Now if we could in fact attach a gameLogic to the muzzle and move it 1000 meters away in a straight line, that would be even better. Imagine taking a gameLogic and putting a stick into it. Now put the other end of the stick into the muzzle of the artillery. If this stick were 1km long, we can get the angle of elevation by:
_artyHeightASL = (getPosASL _arty) select 2;
_angle = (((getPosASL gameLogic) select 2) - (_artyHeightASL)) / 1000;
_elevation = asin _angle;
Again, if anyone knows how to do something like this with a gamelogic.... I'm stumped.
I'm sure Mandoble will come in with an ingenious, much simpler, very doable solution. But I
always do things the hard way! heheh. I'm not smart enough to do it otherwise.