Jurika96 1 Posted January 24, 2023 Hi guys! I'm new to Arma and I'm really into playing artillery. I established in Eden Editor 1 soldier as an FO ( so as him I can provide for myself target coordinates) and 1piece of M4 Schorcher. So after I receive my target coordinate as an FO I calculate the range (elevation from the M4 Schorchers rangetable) and direction then I open fire to the target. As I wrote I do everything manually and it works well but my problem is that somehow I want to fire with all the 6 Schorcher at the same time with my calculated values (elevation and direction) to simulate a fire for effect. My question is, is it possible to control all the 6 gun at the same time or it isn't possible? Thanks for your help. Share this post Link to post Share on other sites
Melody_Mike 130 Posted January 25, 2023 Hi there @Jurika96, welcome to the forums! So if I understand correctly, you want to manually fire multiple artillery units at the same time? Of course, because each artillery/mortar is on a different spot, and none are sitting 100% flat, each needs its' own elevation and rotation. Easy way: If you want to fire several artillery shots at once, then I would recommend the Support Modules. See YouTube for a tutorial: Hard way: If you insist on the no artillery computer/no map clicking, then you can probably script something with animateSource and animateSourcePhase, where the other turrets copy the movement of yours. I'm not behind a PC, will look into it if I have time later. 2 Share this post Link to post Share on other sites
Jurika96 1 Posted January 26, 2023 Yes, you understood me well. Thank you for your help, it helped me a lot, tomorrow I will try it. Share this post Link to post Share on other sites
bLAcKmAgE87 13 Posted January 26, 2023 YES SIR! I use this to shoot chairs into the air... but you can also use it for doArtilleryFire Spoiler //list of useful globals /* artyGuy = _homie ; unitsNato = _yammers select 0 ; leg = _yammers select 1 ; gap = _yammers select 2 ; legb = _yammers select 3 ; bump = _yammers select 4 ; modulZ = _yammers select 5 ; //artyGuy = _yammers select 6 ; dixa = _yammers select 7 ; dix = _yammers select 8 ; getAngleToMarker = _yammers select 9 ; legToMarkx = _yammers select 10 ; legToMarky = _yammers select 11 ; bumpx = _yammers select 12 ; bumpy = _yammers select 13 ; racksModulZ = _yammers select 14 ; racksModulZZ = _yammers select 15 ; modulZX = _yammers select 16 ; modulZS = _yammers select 17 ; modulXX = _yammers select 18 ; totalXOv = _yammers select 19 ; farAcross = _yammers select 20 ; squarezOv = _yammers select 21 ; totalYOv = _yammers select 22 ; farAcrossY = _yammers select 23 ; squarezOvY = _yammers select 24 ; squarezOv2 = _yammers select 25 ; squarezOvY2 = _yammers select 26 ; markDirx = _yammers select 27 ; dix2 = _yammers select 28 ; */ private _area = ( vehicles inAreaArray 'ladyS' ) ; private _alsocount = count ( allUnits inAreaArray 'ladyS' ); private _alsocountV = count ( vehicles inAreaArray 'ladyS' ); //kinda tricky //modulZX is how many across you want //modulZS is how far across you go //modulXX is supposed to deliver any remainder through racks /* private _racksModulZHx = ceil( _unitsNatoHx / _modulZHx ); -->private _racksModulZZHx = ( _unitsNatoHx / _modulZHx ); private _modulZXHx = _modulZHx ; private _modulZSHx = _racksModulZHx ; private _modulXXHx = ( _unitsNatoHx % _modulZHx ) ; ... private _totalXOvHx = abs( _bumpxHx * _modulZHx ) ; private _farAcrossHx = abs( _bumpyHx * _modulZHx) ; private _squarezOvHx = sqrt ( ( _totalXOvHx * _totalXOvHx) + ( _farAcrossHx * _farAcrossHx ) ) ; private _totalYOvHx = abs( _bumpxHx * _racksModulZZHx ) ; private _farAcrossYHx = abs( _bumpyHx * _racksModulZZHx ) ; private _squarezOvYHx = sqrt ( ( _totalYOvHx * _totalYOvHx) + ( _farAcrossYHx * _farAcrossYHx) ) ; */ //basically from here... there's no determining how many coloumns there are //consider trying that... you could runinto a error where you put more cols and croxs than units are. //its one way or the other when practicing automatic selection //so call this script the pre-width and another one the pre-col... it would work out that way until you can compare //one other set of errors... calling out a width wider than units or vice versa private _modulZX = modulZX ; private _modulZS = modulZS ; _modulXXs = ( modulXX ) ; _modulXX = ( _modulXXs - 1) ; hint ( str modulZX + " z " + str modulXX + " x " + str modulZS + " s " + str racksModulZ + " r " + str racksModulZZ + " r ." ); //sleep 7 ; _groups = [] ; _objects = [] ; _Vehicles = [] ; { _Vehicles pushBack _x ; } forEach _area ; private _namr = 'jop_' ; private _namr2 = 'zop_' ; //private _wGroup ='' ; //_wGroup = missionNamespace getVariable [ _wGroup , objNull]; //_WGroup = createGroup west ; private _count = 1 ; private _blam = '' ; private _blamo = '' ; { _blam = _namr + (str _count) ; _x setName _blam ; stag = _count ; //_blamo = _namr2 + (str stag ) ; //_x setGroupId [_blamo] ; _x = missionNamespace setVariable[_blam, _x]; _groups pushback _blam ; _objects pushback _blam ; _count = _count + 1; } forEach _Vehicles ; _count = _count - 1; hint ('the count...' + str _count) ; //sleep 2 ; _startSen2 = 'jop_' ; _startTar2 = 'leadOne' ; private _finSen2 = ''; private _finTar2 = ''; private _mySpot = getPos leadOne ; private _doubleCo = 0 ; what = ( _mySpot select 0 ) ; what2 = ( _mySpot select 1 ) ; hold = what ; hold2 = what2 ; stepper = 1 ; stepperx = 1 ; _bang = 1 ; _hox = 0 ; _waitTimeToFireAfterData = 8 ; hint ('firing in ' + str _waitTimeToFireAfterData) ; sleep _waitTimeToFireAfterData ; wallx = 1 ; ranCirRad = 12; ranCirInner = 330 ; _markerTargetZ = createMarker['targetZone', ( _mySpot )] ; _markerTargetZ setMarkerShape 'ELLIPSE'; _markerTargetZ setMarkerSize [ ranCirRad , ranCirRad]; for [{private _i=1},{_i <= _modulZX },{_i = _i + 1}] do { scopeName 'forShoot' ; for [{private _j= 0},{ _j < _modulZS },{ _j = _j + 1}] do { _randomZ = random 610 ; _randomXY = random ranCirRad ; _randomXY = _randomXY + ranCirInner ; private _centerZ = _mySpot getPos [ _randomXY , _randomZ ] ; passSx = ( _centerZ select 0 ) ; passSy = ( _centerZ select 1 ) ; sweet = _j ; if( sweet == _modulXX && _i == _modulZX ) then { breakTo 'forShoot' ; //this shit sux and causes it to move around from _i } ; if(_hox == 1 ) then { wallx = wallx + _modulZX ; _bang = wallx ; } ; if( _hox == 0 ) then { //_bang = ( ( ( stepperx ) * _j ) * _modulZX ) + stepperx ; _bang = _i ; _hox = 1 ; } ; what = passSx ; what2 = passSy ; _finSen2 = _startSen2 + str ( _bang ) +'' ; _finTar2 = _startTar2 ; _finSen2 = missionNamespace getVariable [_finSen2 , objNull]; _finTar2 = missionNamespace getVariable [_finTar2 , objNull ]; _finTar2 setPos[ what , what2 , getPos leadOne select 2 ]; _myShot = getPos leadOne ; _faze = _finSen2 getDir targetAnimal ; //_faze = _faze + 180 ; _faze = _faze ; //regularScaler = 99111600 ; distanceTo = _finSen2 distance2D targetAnimal ; //ratOvX = sin ( _faze ) ; //ratOvy = cos( _faze ) ; //pushX = regularScaler * ratOvX ; //pushY = regularScaler * ratOvY ; //_finSen2 addForce [[pushX ,pushY ,6780], [ 1,0, 0]]; //_finSen2 addForce [[pushX ,pushY ,1766780], [ 1,0, 1]]; _myCur = getPos _finSen2 ; _nowX = ( _myCur select 0 ) ; _nowY = ( _myCur select 1 ) + 100; _nowZ = ( _myCur select 2 ) + 1000 ; _newPosAB = [(_nowX),(_nowY),(_nowZ)] ; //_finSen2 doMove (getpos targetAnimal ) ; _finSen2 doMove (_newPosAB ) ; //sleep 4 ; //hint( str _myShot ) ; //sleep (.03) ; what = hold ; what2 = hold2; //sleep (5.1) ; }; stepperx = _i + 1 ; _hox = 0 ; wallx = stepperx ; //sleep (12.3) ; }; _finTar2 setPos[hold,hold2,getPos leadOne select 2 ]; hint('finished firing' ) ; sleep 2 ; ... ignoring the way the loop shoots off rows and columns... and just individuals.... Spoiler _randomZ = random 610 ; _randomXY = random ranCirRad ; _randomXY = _randomXY + ranCirInner ; private _centerZ = _mySpot getPos [ _randomXY , _randomZ ] ; passSx = ( _centerZ select 0 ) ; passSy = ( _centerZ select 1 ) ; sweet = _j ; what = passSx ; what2 = passSy ; _finSen2 = _startSen2 + str ( _bang ) +'' ; _finTar2 = _startTar2 ; _finSen2 = missionNamespace getVariable [_finSen2 , objNull]; _finTar2 = missionNamespace getVariable [_finTar2 , objNull ]; _finTar2 setPos[ what , what2 , getPos leadOne select 2 ]; _myShot = getPos leadOne ; _faze = _finSen2 getDir targetAnimal ; //_faze = _faze + 180 ; _faze = _faze ; //regularScaler = 99111600 ; distanceTo = _finSen2 distance2D targetAnimal ; //ratOvX = sin ( _faze ) ; //ratOvy = cos( _faze ) ; //pushX = regularScaler * ratOvX ; //pushY = regularScaler * ratOvY ; //_finSen2 addForce [[pushX ,pushY ,6780], [ 1,0, 0]]; //_finSen2 addForce [[pushX ,pushY ,1766780], [ 1,0, 1]]; _myCur = getPos _finSen2 ; _nowX = ( _myCur select 0 ) ; _nowY = ( _myCur select 1 ) + 100; _nowZ = ( _myCur select 2 ) + 1000 ; _newPosAB = [(_nowX),(_nowY),(_nowZ)] ; //_finSen2 doMove (getpos targetAnimal ) ; _finSen2 doMove (_newPosAB ) ; //sleep 4 ; //hint( str _myShot ) ; //sleep (.03) ; what = hold ; what2 = hold2; //sleep (5.1) ; //_finTar2 setPos[hold,hold2,getPos leadOne select 2 ]; hint('finished firing' ) ; sleep 2 ; ... so that you can have shots... that make shapes or squares what not... replacing doMove with doArtilleryFire commands 1 Share this post Link to post Share on other sites